In Visual Studio my project builds and runs with no problem. When deploying to Windows Server 2012 R2 I encounter the following error:
A default document is not configured for the requested URL, and directory browsing is not enabled on the server.
I have installed all 4.5 and other Roles and Profiles
, have given permission to the folder to everyone and have read every article and tried to implement every suggestion to no avail..
I'm out of options, spent weeks on this and cannot understand how this is so convoluted just to deploy a site.. Can someone advise? Thanks
Edit - this is for Windows Server 2012 and I have tried suggested alternatives such as adding runAllManagedModulesForAllRequests
to my web.config.
Edit When deploying I build the solution in Release mode and copy the bin, views, content and scripts folders over to Windows Server. In IIS I then make the folder an application, making sure a 4.0 App Pool is assigned and still receive the error.
Final Edit Publish allowed me to see the structure that needed to be copied over. There were also 3 dll's that needed to be copied local from Visual Studio:
- System.Web.Http.dll
- System.Web.Http.WebHost.dll
- System.Net.Http.Formatting.dll
As well as Web.Config dependentAssembly updated to take into account some MVC4 dll's such as Unity.Mvc4 pointing to MVC3 binaries.