MVC newbie here... I just put together my first ever MVC web site, and it works in development. Now I publish it to my local IIS 7.5 using "Web deploy", to "localhost", "Default Web Site/MySite". The "Mark as IIS application on destination" and "Leave extra files..." checkboxes are unchecked.
Publish succeeds. So I open my browser and go to http://localhost/MySite, and get the error "HTTP Error 403.14 - Forbidden - The Web server is configured to not list the contents of this directory."
Huh? I thought the whole idea of the controller was that you don't have to specify a default page; it works out for you which page you want? Or have I misunderstood something?
How does your web.config look like? Depending on version of IIS you need to include runAllManagedModulesForAllRequests="true"
on your modules-section. You should add this hotfix http://support.microsoft.com/kb/980368 so you don't need this attribute.
This caught me once - I had forgotten to include the Global.asax file. Has that definitely been deployed?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With