Publish MVC application to IIS, now there is an error - there is no default document?

MVC is new here ... I just put together my first MVC website and it works in development. Now I publish it in my local IIS 7.5 using "Web Deployment", "localhost", "Default Web Site / MySite". The checkboxes "Mark as IIS application at destination" and "Leave additional files ..." are not checked.

Post successfully. Therefore, I open my browser and go to http: // localhost / MySite and get the error message "HTTP Error 403.14 - Forbidden - the web server is not configured to list the contents of this directory."

BUT? I thought the whole idea of ​​the controller is that you do not need to specify a default page; for you, which page do you want? Or didn’t I understand something?

+6
c # model-view-controller visual-studio asp.net-mvc
source share
4 answers

Checked this and this ?

+4
source share

What does your web.config look like? Depending on the version of IIS, you need to include runAllManagedModulesForAllRequests="true" in your modules section. You must add this hotfix http://support.microsoft.com/kb/980368 so that you do not need this attribute.

+4
source share

This caught me once - I forgot to include the Global.asax file. Was it definitely deployed?

+1
source share

In IIS, I had to move the static file handler over the URL handler without an extension to automatically update SSL. This happened after receiving this error. Fixed by adding Global.asax to the default list of documents.

0
source share

All Articles