My.NET 4.7 MVC 5 project website displays its file listing, but it should show the home page of the project

iqworks Information Quality Works 276 Reputation points

Hi, I am not sure what could cause my website to display the projects file listing instead of the intended home page?

During the upgrade, here are some packages I had to install :

PM> NuGet\Install-Package Microsoft.AspNet.Mvc -Version 5.3.0 

***PM> Install-Package Microsoft.AspNet.WebApi.WebHost ***

PM> Install-Package -Id  Microsoft.AspNet.WebHelpers

I also had to make changes to my web.config and my view/web.config versions.

User's image

Thanks for any advice or suggestions

A set of technologies in the .NET Framework for building web applications and XML web services.
3,362 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. QiYou-MSFT 4,311 Reputation points Microsoft Vendor

    Hi @iqworks Information Quality Works

    You should have encountered this problem when deploying a website at IIS.

    Let me talk about three solutions:

    1.You didn't select the right path when adding the site at IIS. In fact, you should choose your project directly.

    For example:

    When you select a folder for a project instead of selecting a project directly:


    That will bring up the table of contents:


    If you do this, it will work fine:


    1. Configure web.config:
    <system.webServer>  <modules runAllManagedModulesForAllRequests="true" />  </system.webServer>

    3.Enter commands in the console:

    aspnet_regiis.exe -i
    iisreset /stop
    iisreset /stop

    Best regards,

    Qi You

    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments