简体   繁体   English

在哪里可以学习如何将ASP.NET 4 MVC 2应用程序部署到IIS7?

[英]Where can I learn how to deploy ASP.NET 4 MVC 2 applications to IIS7?

I've done a significant amount of searching and am having difficulty finding people who have encountered a similar problem. 我已经进行了大量搜索,但是很难找到遇到类似问题的人。

I have gone into the properties for my project and set it to use the local IIS web server instead of the VS Dev server. 我进入了项目的属性,并将其设置为使用本地IIS Web服务器而不是VS Dev服务器。 It created the virtual directory just fine. 它创建虚拟目录就好了。 When I attempt to browse to the site, I receive the following error: 当我尝试浏览该站点时,出现以下错误:

HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. HTTP错误403.14-禁止Web服务器配置为不列出此目录的内容。

I haven't done any custom routing rules for my project, so all of that is in its default state. 我没有为我的项目做任何自定义的路由规则,所以所有这些都处于默认状态。 The only other thing that I can think of is that there is something special that needs to be done to set up the "default" page for an MVC 2 deployment. 我唯一能想到的是,需要做一些特殊的事情才能为MVC 2部署设置“默认”页面。

Any help would be greatly appreciated. 任何帮助将不胜感激。

%windir%\Microsoft.NET\Framework64\v4.0.30128\aspnet_regiis.exe -ir

That solved it for me in the past. 过去为我解决了这个问题。 (remove the "64" if you're on 32-bit) (如果您使用的是32位,请删除“ 64”)

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

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