简体   繁体   English

我应该如何部署ASP.NET 4 MVC网站?

[英]How am I supposed to deploy an ASP.NET 4 MVC website?

What's the recommended way to deploy a website created with ASP.NET 4.0 and Visual Studio 2010? 推荐使用哪种方法来部署使用ASP.NET 4.0和Visual Studio 2010创建的网站?

I've previously always added a web setup project to my solution, and used that to create an MSI, even for small applications. 以前,我总是向解决方案中添加一个Web设置项目,并使用它来创建MSI,即使对于小型应用程序也是如此。

But when I build a web setup project in VS2010 it kind of works but some stuff still seems broken: 1. I need to turn on IIS 6 Compatibility on a Win 2008 R2 box to get the msi to run. 但是,当我在VS2010中建立一个Web安装项目时,它可以正常工作,但有些东西似乎仍然坏了:1.我需要在Win 2008 R2机器上打开IIS 6兼容性,以运行MSI。 2. The msi includes web.config, web.debug.config, and web.release.config. 2. msi包括web.config,web.debug.config和web.release.config。 I thought VS's web.config transformations was supposed to take care of that. 我认为VS的web.config转换应该可以解决这个问题。

-Matt -马特

I suggest looking at using MSDeploy , which packages up all your files and configuration settings into a zip file that can then be imported into IIS 7. 我建议使用MSDeploy ,它将所有文件和配置设置打包到一个zip文件中,然后可以将其导入IIS 7。

Scott Hanselman had a great presentation that shows how to use MSDeploy . Scott Hanselman的精彩演讲展示了如何使用MSDeploy

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

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