如何将ASP.NET应用程序部署到实时服务器? [英] How do you deploy your ASP.NET applications to live servers?

查看:202
本文介绍了如何将ASP.NET应用程序部署到实时服务器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找用于将ASP.NET Web应用程序( NOT ASP.NET网站)部署到生产的不同技术/工具?



我对于连续集成构建服务器在某个位置删除二进制文件和第一个用户请求的时间点击这些二进制文件的时间之间的工作流特别感兴趣。您是否使用某些特定工具或仅使用XCOPY?p>


  1. 应用程序如何打包(ZIP,MSI,...)?


  2. 第一次部署应用程序如何设置App Pool和虚拟目录(您是否手动创建或使用某些工具)?


  3. 当静态资源更改(CSS,JS或图像文件)时,是否重新部署整个应用程序或仅重新部署修改的资源?汇编/ ASPX页面何时更改?


  4. 您是否跟踪给定应用程序的所有部署版本,如果出现问题,您有程序将应用程序还原到以前的已知工作状态?


随时完成上一个列表。




这是我们用来部署我们的ASP.NET应用程序:


  1. 我们添加一个 Web部署项目解决方案,并将其设置为构建ASP.NET Web应用程序

  2. 我们添加一个安装程序( NOT Web安装项目)并将其设置为采取Web部署项目的输出

  3. 我们添加一个自定义安装操作,并在OnInstall事件中运行一个自定义构建.NET程序集创建一个App Pool和一个Virtual Dir ectory在IIS中使用 System.DirectoryServices.DirectoryEntry (This任务仅在第一次部署应用程序时执行)。我们支持IIS中的多个网站,虚拟目录的身份验证和App Pools的身份设置。

  4. 我们在TFS中添加一个自定义任务来构建安装项目(TFS不支持安装项目我们必须使用devenv.exe构建MSI)

  5. MSI安装在实时服务器上(如果先前版本的MSI首次被卸载)


解决方案

我们使用安装工厂在MSI中部署了所有代码。如果有必要改变,我们将重新部署整个解决方案。这听起来像一个css文件的过分,但它绝对保持所有的环境同步,我们知道在生产中是什么(我们以相同的方式部署到所有测试和uat环境)。


I am looking for different techniques/tools you use to deploy an ASP.NET web application project (NOT ASP.NET web site) to production?

I am particularly interested of the workflow happening between the time your Continuous Integration Build server drops the binaries at some location and the time the first user request hits these binaries.

  1. Are you using some specific tools or just XCOPY? How is the application packaged (ZIP, MSI, ...)?

  2. When an application is deployed for the first time how do you setup the App Pool and Virtual Directory (do you create them manually or with some tool)?

  3. When a static resource changes (CSS, JS or image file) do you redeploy the whole application or only the modified resource? How about when an assembly/ASPX page changes?

  4. Do you keep track of all deployed versions for a given application and in case something goes wrong do you have procedures of restoring the application to a previous known working state?

Feel free to complete the previous list.


And here's what we use to deploy our ASP.NET applications:

  1. We add a Web Deployment Project to the solution and set it up to build the ASP.NET web application
  2. We add a Setup Project (NOT Web Setup Project) to the solution and set it to take the output of the Web Deployment Project
  3. We add a custom install action and in the OnInstall event we run a custom build .NET assembly that creates an App Pool and a Virtual Directory in IIS using System.DirectoryServices.DirectoryEntry (This task is performed only the first time an application is deployed). We support multiple Web Sites in IIS, Authentication for Virtual Directories and setting identities for App Pools.
  4. We add a custom task in TFS to build the Setup Project (TFS does not support Setup Projects so we had to use devenv.exe to build the MSI)
  5. The MSI is installed on the live server (if there's a previous version of the MSI it is first uninstalled)

解决方案

We have all of our code deployed in MSIs using Setup Factory. If something has to change we redeploy the entire solution. This sounds like overkill for a css file, but it absolutely keeps all environments in sync, and we know exactly what is in production (we deploy to all test and uat environments the same way).

这篇关于如何将ASP.NET应用程序部署到实时服务器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆