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

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

问题描述

我要寻找不同的技术/工具,你用它来部署ASP.NET Web应用程序项目(不会 ASP.NET网站)生产?

我特别感兴趣的工作流程的持续集成构建服务器在某个位置,并第一个用户请求到达这些二进制文件的时间下降了二进制文件的时间之间发生的事情。


  1. 您使用一些特定的工具或只是XCOPY?应用程序是如何打包(ZIP,微星,...)?


  2. 当一个应用程序部署在第一次你如何安装应用程序池和虚拟目录(你手动或使用一些工具来创建它们)?


  3. 在静态资源的变化(CSS,JS或图像文件)你重新部署整个应用程序,或者只修改后的资源?如何当装配/ ASPX页面的变化?


  4. 你跟踪所有已部署的版本,对于给定的应用程序,并在万一出错你有应用程序恢复到已知的工作状态previous程序?


随意完成previous列表。


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


  1. 我们添加一个<一个href=\"http://www.microsoft.com/downloads/details.aspx?FamilyId=0AA30AE8-C73B-4BDD-BB1B-FE697256C459&displaylang=en\">Web部署项目到解决方案,并设置它来构建ASP.NET Web应用程序

  2. 我们添加一个安装项目(不会 Web安装项目)到溶液中,将其设置为取Web部署项目
  3. 的输出
  4. 我们添加自定义安装操作,并在OnInstall情况下,我们运行创建一个应用程序池,并使用在IIS虚拟目录<自定义生成.NET程序集href=\"http://msdn.microsoft.com/en-us/library/system.directoryservices.directoryentry.aspx\">System.DirectoryServices.DirectoryEntry (此任务只进行第一次的应用程序被部署)。我们支持在IIS中,验证多个Web站点的虚拟目录并设置身份的应用程序池。

  5. 我们在TFS添加自定义任务来构建安装项目(TFS不支持安装项目,所以我们不得不使用devenv.exe的构建MSI)

  6. 的MSI安装在现场服务器(如果还有的MSI它首先卸载的previous版)


解决方案

我们拥有所有我们使用安装在工厂部署的MSI code的。如果有什么需要改变,我们重新部署整个解决方案。这听起来像矫枉过正一个CSS文件,但它绝对是保持所有环境保持同步,我们确切地知道在生产中(我们部署到所有的测试和验收测试环境以同样的方式)。

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天全站免登陆