简体   繁体   English

将ASP.NET应用程序部署到远程服务器

[英]Deploy ASP.NET app to remote server

I am looking for a solution to deploy ASP.NET application from SVN in one server to other remote web server. 我正在寻找一种解决方案,将一个服务器中的SVN从一个服务器部署到其他远程Web服务器。 FTP is not allowed. FTP是不允许的。 Other tasks than file copy should be done - eg create virtual directory. 应该完成除文件复制之外的其他任务 - 例如创建虚拟目录。

Which tools would you use? 你会用哪些工具? Remote server could have MSBuild or NAnt installed but how to securely copy files from SVN server to web server? 远程服务器可以安装MSBuild或NAnt,但如何安全地将文件从SVN服务器复制到Web服务器? Maybe SSH? 也许SSH? Are there any alternatives? 还有其他选择吗? Is it possible to have an atomic operation on file copy? 是否可以对文件副本进行原子操作? I do not think that Continuous Integration servers would help me. 我不认为持续集成服务器会帮助我。

Both SVN and web servers are built using Windows 2k3, IIS 6.0, .NET 2.0. SVN和Web服务器都是使用Windows 2k3,IIS 6.0,.NET 2.0构建的。

Edit 编辑

deployment should be automatic using SVN post commit hook. 使用SVN post commit hook自动部署。

I use psexec from sysinternals ( http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx ) to remotely call svn commands in my hook script. 我使用sysinternals中的psexec( http://technet.microsoft.com/en-us/sysinternals/bb896649.aspx )在我的钩子脚本中远程调用svn命令。 Basically, whenever anyone checks something in to the production branch, it calls svn update on the remote server and the updates get pulled into production. 基本上,每当有人检查生产分支中的某些内容时,它会调用远程服务器上的svn update并将更新投入生产。

This may or may not work depending on what ports are open between the two servers. 根据两台服务器之间打开的端口,这可能有效,也可能无效。

But maybe a continuous integration server might help? 但也许持续集成服务器可能有所帮助? Here are some ideas: 以下是一些想法:

For example, I'm using CruiseControl.NET to automatically build our solutions after every commit. 例如,我正在使用CruiseControl.NET在每次提交后自动构建我们的解决方案。 Maybe you could use this on your web server to retrieve the latest version from the SVN repository after every commit. 也许您可以在Web服务器上使用它来在每次提交后从SVN存储库中检索最新版本。

If it is required that the access to the SVN repository is secure, then maybe you could use VisualSVN server on the repository server and then access the repository using https. 如果要求对SVN存储库的访问是安全的,那么您可以在存储库服务器上使用VisualSVN服务器,然后使用https访问存储库。

(lots of maybe's, but maybe ;-) there's something that can help you) (很多可能的,但也许;-)有一些东西可以帮助你)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM