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
2024-06-06T23:26:12.68+00:00

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

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

1 answer

Sort by: Most helpful
  1. QiYou-MSFT 4,311 Reputation points Microsoft Vendor
    2024-06-07T06:20:14.5166667+00:00

    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:

    123

    That will bring up the table of contents:

    345

    If you do this, it will work fine:

    234

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

    3.Enter commands in the console:

    C:\Windows\Microsoft.NET\Framework\v4.0.30319
    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