Deploy MVC 3 Site From LocalHost to IIS (Directory Listing Denied)

邮差的信 提交于 2019-12-24 10:56:12

问题


I have my site at:

http://localhost:55649/

I want to move it to:

\\10.0.0.169\Inetpub\wwwroot\MyOldWebsite\NewSite

I read this http://haacked.com/archive/2011/05/25/bin-deploying-asp-net-mvc-3.aspx and clicked "Add Deployable Assemblies" but I get the error:

Directory Listing Denied

This Virtual Directory does not allow contents to be listed.

What can I do to fix this error to make the site work?


回答1:


When you get that message it tends to be because routing isn't working and the site is trying to find a default document (which in MVC3 doesn't exist). If routing isn't working that generally means IIS isn't interpreting it as an MVC3 site or doesn't know what an MVC3 site is.

  1. Does your server have .NET Framework 4.0 and MVC3 installed?
  2. Is your site using a .NET 4.0 application pool?
  3. Does your new directory have the proper permissions? Depending on the application/server security this can change. But generally IUSR needs read access.


来源:https://stackoverflow.com/questions/11799314/deploy-mvc-3-site-from-localhost-to-iis-directory-listing-denied

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