Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Publish MVC app on IIS, now has error - no default document?

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?

like image 872
Shaul Behr Avatar asked Jan 25 '11 14:01

Shaul Behr


2 Answers

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.

like image 59
Pauli Østerø Avatar answered Oct 02 '22 19:10

Pauli Østerø


This caught me once - I had forgotten to include the Global.asax file. Has that definitely been deployed?

like image 34
pete the pagan-gerbil Avatar answered Oct 02 '22 19:10

pete the pagan-gerbil