Ok, So as a company we deployed our first MVC3 application on a web server. Which has been set up to handle .NET
The server uses Windows Server 2008 and IIS 7.
However when we point the browser to the URL we receive this error.
Directory Listing Denied
This Virtual Directory does not allow contents to be listed.
When we point it to a known path such as:
http://websitename/subfolder/subfolder/Views
We get the same error. Clearly when ww try to go directly to the Razor page, for example:
http://websitename/subfolder/subfolder/Views/Pages/Index.cshtml
As you would expect it downloads the .cshtml file, because the browser can’t read .cshtml, it reads the generated .html.
if I point to:
http://websitename/subfolder/subfolder/Views/Pages/Index.html
It cant find anything.
It works running on localhost through Visual Studio. and when published the start up page is just the root and it runs and directs to the correct place through VS.
My question is how do you point to the generated html on a web server manually, or is there a reason it isn’t finding the start page when I just go to the root on the server?
I have check the IIS and made sure that the correct things are set to local copy ‘true’, and I have also added runAllManagedModulesForAllRequests=”true” to my web.config file.
Any help or a point in the right direction would be appreciated.
It seems that you haven’t installed .NET 4.
Please can you clarify your server settings, such as OS, IIS version, etc?