Publishing to IIS7 fileshare results in HTTP ERROR 403.13
I have an test server setup that is running a version of the site I am working on. I change nothing on the server (IIS and whatnot). I hav开发者_运维百科e a share mapped to a directory below where the site is running from. I publish into the directory from VS2010. When I hit the site the next time, I get "HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory."
Review: Before the publish the application ran just fine. Publish = 403.14. Listing the directory is not the goal.
I can reset the file permissions with no change. If I restart the Site, IIS and the App pool, no change. If I delete the site in IIS and recreate it, it works again.
When I had this problem, I solved it by making sure the System.Web.Mvc dll was available on the web server. If it's not in the GAC, you can make sure it gets copied with the publish process by setting the Copy Local to true on the System.Web.Mvc project reference
I guess the answer is, don't do that. I can no longer reproduce the problem, so the result may not be related to the perceived problem.
精彩评论