HTTP Error 500.30 - ASP.NET Core app failed to start

Юрий Кузнецов 0 Reputation points
2024-08-21T04:02:46.8066667+00:00

After upgrading Visual Studio to version 17.11, my Web API stopped working and I get an error:

HTTP Error 500.30 - ASP.NET Core app failed to start Common solutions to this issue: The app failed to start The app started but then stopped The app started but threw an exception during startup Troubleshooting steps: Check the system event log for error messages Enable logging the application process' stdout messages Attach a debugger to the application process and inspect For more guidance on diagnosing and handling these errors, visit Troubleshoot ASP.NET Core on Azure App Service and IIS.

In Windows Events:

Application '/LM/W3SVC/1/ROOT/AsuWebAPI' with physical root 'C:\Solforb\CQRS\Web\AsuWebAPI' failed to load coreclr. Exception message: CLR worker thread exited prematurely

Application '/LM/W3SVC/1/ROOT/AsuWebAPI' with physical root 'C:\Solforb\CQRS\Web\AsuWebAPI' hit unexpected managed exception, exception code = '0xe0434352'. Please check the stderr logs for more information.

And I can't send an error message through Visual Studio, it just doesn't work. The website issues an error with WebSocket, and the submission window does not open in Visual Studio Installer.

Internet Information Services
Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
5,193 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Sam Wu-MSFT 7,531 Reputation points Microsoft Vendor
    2024-08-22T03:10:07.06+00:00

    @Юрий Кузнецов,

    This error indicates that your application is failing during the startup phase, which can be due to various reasons such as missing dependencies, incorrect configuration, or runtime issues.

    Here are the steps you can take to troubleshoot and resolve the issue:

    1. Check for Missing Dependencies
    • Ensure all required NuGet packages are correctly installed. After upgrading Visual Studio, some packages might need to be updated to compatible versions.
    • Open the NuGet Package Manager and check for updates to your packages.
    1. Rebuild the Project
    • Perform a clean rebuild of your project in Visual Studio. Sometimes after upgrading Visual Studio, cached files or older build artifacts might cause issues.
    • Clean the solution (Build > Clean Solution) and then rebuild it (Build > Rebuild Solution).
    1. Update Visual Studio Installer
    • Since you mentioned that the Visual Studio Installer isn't working correctly, this might indicate a deeper issue with the installation itself.
    • Try repairing Visual Studio from the installer, open the Visual Studio Installer, select your installed version and click on "More" > "Repair"
    • If the installer window is not opening, you can try launching it from the command line:
        "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vs_installer.exe"
      
    • Ensure that all components and workloads are up-to-date.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote. 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

  2. Frederic Toyon 0 Reputation points
    2024-10-23T08:00:38.1+00:00

    Hi,

    If this can help other galley slaves like me, I found the culprit in my case.

    It is a line in the web.config file that points to a non-existent dll in visual 17.11:

    <environmentVariable name="DOTNET_STARTUP_HOOKS" value="c:\program files\microsoft visual studio\2022\enterprise\common7\ide\extensions\microsoft\web tools\projectsystem\Microsoft.WebTools.ApiEndpointDiscovery.dll" />
    

    Deleted it and it's back.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.