Search code examples
asp.net-mvciisasp.net-mvc-5windows-server-2012-r2iis-8.5

Deployed project cannot load the default document and lists the directory instead


Below are my project specifications :

  • ASP.NET MVC 5
  • Windows Server 2012 R2
  • IIS 8.5

I deployed my project on a server composed of above specifications. Now, When I try to load the project, it lists the directory of my project instead of loading the default document as below :

enter image description here

What could possibly be the thing I'm doing wrong here? Why is it not loading the initial page of the application?


Solution

  • So, I figured it out, goes this way :

    • Click "Server Manager"
    • Click "Manage" at the top right
    • Go to "Add Roles and Features"
    • Proceed until "Server Roles"
    • In the "Server Roles" tab of the "Roles" section Check "Web Server (IIS)" > "Web Server" > "Application Development" > Check all except "CGI"
    • Click "Next" & "Install"

    You are good to go.