Publishing MVC3 app to IIS error - The Web server is configured to not list the contents of this directory

人走茶凉 提交于 2019-12-12 16:18:48

问题


I published my website to "C:\inetpub\wwwroot\Sem_App" and created a website with physical path "C:\inetpub\wwwroot\Sem_App" and port 84. When I browse the website on http://localhost:84/ I get the following error.

HTTP Error 403.14 - Forbidden
The Web server is configured to not list the contents of this directory.

I do not want to list contents of the directory anyways, I want to run the default page that used to run in debugging mode of VS 2010. Anybody know what's going on?

I tried running this command and restarted iis but it didn't work C:\Windows\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir


回答1:


You may need to enable directory browsing option in IIS. Check out the below link for ASP.NET MVC deployment to IIS 6. (For .Net 4.0)

http://www.codefrenzy.net/2011/10/19/deploying-asp-net-mvc-3-to-iis-6/




回答2:


go to cmd type this and you're good to go %windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_regiis.exe -ir

windir is typically C:\Windows



来源:https://stackoverflow.com/questions/10091103/publishing-mvc3-app-to-iis-error-the-web-server-is-configured-to-not-list-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!