部署 ASP.NET 应用程序:推与拉?

发布于 2024-08-05 06:05:37 字数 377 浏览 4 评论 0原文

如何部署 ASP.NET 应用程序?您是否使用 UNC 路径/映射驱动器将其推送到生产服务器? FTP? SFTP? SSH/SCP(通过安装的第 3 方应用程序)?还有别的事吗?或者您是否使用源代码控制更新或其他机制从生产服务器中提取它?考虑生产服务器位于互联网或 DMZ 中,推送需要打开不安全的防火墙端口(对于 UNC 或 FTP),不是吗?

我正在努力巩固我的 ASP.NET 部署理念。我理想的一键式构建/部署过程将包括以下部分:MSBuild、Web 部署项目、CruiseControl.NET。但是,我仍然在努力解决如何将这些位实际交付到生产服务器的问题。

在 Windows 和 *nix 平台上度过了一段时间后,我对 Windows 部署故事感到沮丧,因此很好奇其他人是如何做到这一点的。

How do you deploy ASP.NET applications? Do you push it to production servers using UNC paths/mapped drives? FTP? SFTP? SSH/SCP (via 3rd party app installed)? Something else? Or do you pull it from the production servers with a Source control update or other mechanism? Consider the production servers being on the internet or in a DMZ, push requires opening insecure firewall ports (for UNC or FTP) does it not?

I'm trying to solidify my deployment philosophy for ASP.NET. The pieces that my ideal one-click build/deploy process will include are: MSBuild, Web Deployment Projects, CruiseControl.NET. But, I still struggle with how to actually deliver the bits to the production server.

After spending time on both Windows and *nix platforms, I get frustrated with the Windows deployment story and so am curious how others are doing this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

请帮我爱他 2024-08-12 06:05:37

我使用 Cruisecontrol.net,对此非常满意。我有一个 Cruise Control 调用的 nant 脚本:

  1. 从我们的暂存 SVN 分支获取源代码
  2. 构建它
  3. 将文件复制到每个生产服务器
  4. 在 svn 的生产分支中创建一个标签,以便我们获得推送内容的快照。

效果很好!一年前我们过去都是手动完成这一切,我无法告诉你这有多好。有一个小的学习曲线和一些预先的脚本编写。这可能需要几天的时间,但最终您会节省更多时间。

I use cruisecontrol.net and am very happy with it. I have a nant script that cruise control calls which:

  1. Gets the source from our staging SVN branch
  2. Builds it
  3. Copies the files to each production server
  4. Creates a tag in our production branch in svn so we have a snapshot of what was pushed.

Works great! We used to do this all manually a year ago and I can't tell you how much better this is. There is a small learning curve and some upfront script writing. That might take a couple days but you will save much more time in the end.

情仇皆在手 2024-08-12 06:05:37

这就是我们发布的方式:

  • 从 Visual Studio 发布到本地文件夹
  • 删除一些不需要的文件和文件夹(例如它无缘无故创建的空 Web 引用文件夹...)
  • Zip
  • 使用远程桌面复制到阶段服务器
  • 在中解压站点中的 temp 文件夹(这为文件提供了正确的权限)
  • 将当前文件移动到备份文件夹
  • 将新文件移动到站点
  • 测试它在临时服务器上的工作情况
  • 运行脚本(由托管公司设置)将文件复制到两台前端服务器

(但是,我们其中一台前端服务器遇到了一些硬件问题,因此作为短期(?)解决方案,我们必须借用另一台服务器作为字体端服务器,并且脚本不会将文件复制到因此,在过去一年左右的时间里,我不得不使用远程桌面登录到实时服务器,手动复制文件,将当前文件移动到备份文件夹并将新文件移动到位。)

This is how we publish:

  • Publish from Visual Studio to a local folder
  • Remove some unwanted files and folders (like the empty web reference folder that it creates for no appearent reason...)
  • Zip
  • Use remote desktop to copy to stage server
  • Unpack in a temp folder in the site (this gives the files the right permissions)
  • Move current files to a backup folder
  • Move new files to site
  • Test that it works on the staging server
  • Run a script (set up by the hosting company) that copies files to the two front end servers

(However, we had some hardware problems with one of the front end servers, so as a short term (?) solution we got to borrow another server as font end server, and the script doesn't copy the files to that server. So the last year or so I have had to use remote desktop to log on to the live server, manually copy the files, move current files to a backup folder and move new files in place.)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文