问题
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.
- Does your server have .NET Framework 4.0 and MVC3 installed?
- Is your site using a .NET 4.0 application pool?
- 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