The process was terminated due to an internal error in the .NET Runtime

Tal Kabalo 0 Reputation points
2024-09-10T16:20:47.8566667+00:00

Hi everyone,

We have a windows 2019 server that hosts an IIS website.

Since today, when trying to sign in to the site, it gives 503 error.

I figured out that if I'm looking at Application Pools in IIS manager, it shows that the status is Stopped.

Image

If I manually start it, it works fine for few minutes than goes back to Stopped.

When looking in the Event viewer of the host server, it shows the following error:

Application: w3wp.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an internal error in the .NET Runtime at IP 6FFD6952 (6FFB0000) with exit code 80131506.

I could not find any resolution in Google.

I tried using SFC/SCANNOW and dism /online /cleanup-image /restorehealth etc,

tried to repair the .net framework using the dedicated repair tool from Microsoft, but no success.

Did anyone encounter such issue before?

And suggestions?

Thanks

Internet Information Services
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,459 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Michael Taylor 53,971 Reputation points
    2024-09-10T20:02:59.7333333+00:00

    The error is a general purpose execution error by the runtime. That means the runtime had a fatal error so it immediately crashes your app. This is exceedingly rare but can happen for a variety of reasons. We actually saw this error a few weeks back after an app deployment. The fact that there is no useful logged information makes it very difficult to diagnose.

    I would start with what might have changed on the server of recent. Did you apply updates or redeploy your app? Barring hardware failures it seems unlikely that your app would suddenly start failing if nothing changed.

    Can you determine what the app is doing at the time? For example if the app is under load when it fails then that might point to one set of problems. However if the app is idle at the time then that might indicate something completely different.

    Are you using any native components like COM or native binaries in your web app? These can cause the error if they corrupt memory.

    Yet another cause that some people have reported is with the concurrent garbage collector. If the GC "messes up" then it can corrupt memory which will cause the crash. This is more likely for older NET Framework installations. What version of NET Framework is installed on the server (e.g. 4.7.2, 4.8, etc)? If you have a really old framework version then updating the framework version may be sufficient. Otherwise you may consider disabling the concurrent GC to see if the problem goes away. Note that this could negatively impact performance so you'd want to test it and turn it back on if it isn't the issue.

    If you can reliably crash your app then grab the minidump file that Windows should generate when the process crashes (C:\Windows\minidump) and load it up in the debugger to see what is going on. If you cannot reliably crash the app then you might need to wait until it replicates and then find the crash dump that is generated for it.


  2. Sam Wu-MSFT 7,446 Reputation points Microsoft Vendor
    2024-09-11T03:29:00.7766667+00:00

    @Tal Kabalo,

    The error message you're seeing typically indicates an issue with the .NET runtime environment, here are some steps you can take to troubleshoot and resolve this issue:

    1. Ensure the Application Pool's .NET CLR Version is Correct: Make sure that the Application Pool is set to use the correct version of the .NET CLR that your application targets.
    2. Identity Issues: Verify that the Application Pool's identity has the necessary permissions. Sometimes, incorrect permissions or a corrupted user profile can cause such problems.
    3. Reinstall or Repair .NET Framework: Although you’ve tried some repair steps, it might be helpful to uninstall and reinstall the .NET Framework. You can download the installer for the .NET Framework version you need from the Microsoft website.
    4. Apply Latest Updates: Ensure that your server has all the latest Windows updates and .NET Framework patches.

    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

  3. Tal Kabalo 0 Reputation points
    2024-09-11T08:24:36.71+00:00

    Hi @Sam Wu-MSFT and @Michael Taylor,

    First of all, there were no updates deployed for the app ever since we started using it.

    The only updates occurring are Windows monthly security updates.
    At first I wanted to rule out the idea that Windows August security update might have corrupted the .Net, but it appears that even after I uninstalled the update, the issue is still there.

    The .Net crash only when user tries to send an email using the send an email function in the web app itself.
    The fact that the .Net crash doesn't effect the whole app, its working fine just without the ability to send an email.

    The issue started 3 weeks ago, when there was no known changes to the server or the application.

    Regarding the garbage collector idea, I first want to say that I did not create this web app, it was created by 3rd party vendor which does not provide support nor updating the app.

    I did manage to find a file called Web.Config, and once I opened it, I couldn't find any reference to the gcConcurrent. So I did try to manually insert the following code <gcConcurrent enabled="false"/> and it didn't change a thing. I guess the fact that the file did not contain that gcConcurrent from the first place means it's probably not the issue.

    I also couldn't find any minidump folder or files in C:\Windows so I'm not sure how am I supposed to find any logs regarding the true reason of this .Net error.

    We are using Windows server 2019 version 1809, with latest .Net version 4.8.

    I also tried to use Microsoft .Net repair tool to no avail.

    Any other ideas?

    Thanks


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.