Problem on server after upgrad from .NET 4.6 to .NET 4.8 (site is KO)

Wassim GHARSALLAOUI 20 Reputation points
2024-02-01T15:19:42.1+00:00

Hello, We have just updated the version of an asp.net MVC project from .NET framework 4.6 to .Net 4.8. Following this, the solution compiles and works well locally whereas this is not the case after deploying the site. it no longer works on the server knowing that the .NET 4.8 version is installed on our server machine and the dependencies are up to date. Can you give me a lead and an idea, it's possible that I'm missing something? Thank you.error site

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,449 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,306 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,130 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 57,646 Reputation points
    2024-02-01T23:33:32.3833333+00:00

    System.Net.Http was reworked for net 4.6.1 and is part of the framework so you no longer include the package. you probably have a 4.6 project or nuget package that is dependent on the old package. You can fix up the projects or just a add a binding override in web.config

    if it runs locally, than check the hint paths in the project files, they are probably out of date.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Michael Taylor 49,166 Reputation points
    2024-02-01T15:40:54.7+00:00

    This is the generic error page so it doesn't provide any useful information. Enable custom errors in your app's web.config and then try again. You'll get a more detailed error message.

    <system.web>
            <customErrors mode="On" />
    </system.web>
    

    Note that if you upgrade the .NET Framework then you must ensure all the web components are restarted. If you rebooted the server then that is sufficient. If you didn't, and a reboot wasn't required, then you have to restart multiple services.

    Stop-Service w3svc
    Stop-Service was
    
    Start-Service w3svc
    

    If that doesn't help then reregister ASPNET using aspnet_regiis -i.

    1 person found this answer helpful.

  2. Wassim GHARSALLAOUI 20 Reputation points
    2024-02-01T18:27:36.81+00:00

    erreur .net