Repair .NET Framework on Windows 2008 R2

20,323

Solution 1

As mention, the .net framework is now an integral part of the OS and can't just be repaired from add/remove programs. You can run System File Checker, to check the OS components by running this from the command prompt.

sfc /scannow

However the only way to perform a full repair of the .net components is to repair or re-install the OS.

Solution 2

Reinstall the server. Seriously.

.NET is part of the OS an dthus installed. You can try removing / readding it, but at the end you have a compromised integrity of the operating system. As you say "one of" I assume you havea cluster - dont think abuot it, just wipe it, install it and reintegrate it.

Share:
20,323

Related videos on Youtube

Niels R.
Author by

Niels R.

I'm a freelance .NET/C# developer.

Updated on September 17, 2022

Comments

  • Niels R.
    Niels R. almost 2 years

    One of our web servers has become inoperable and after some searching we think the .NET Framework might be corrupted in some way.

    The server runs Windows 2008 R2 and uses the 2.0 framework for the ASP.NET application that is (or better: was) running using IIS 7.5.

    I'm wondering how we can reinstall the .NET 2.0 Framework on Windows 2008 R2. Any ideas?

    Kind regards, Niels R.

    • MikeT
      MikeT over 14 years
      What makes you think .net framework is corrupt? You cannot uninstall .net 2.0 in Windows Server 2008. Yes, if you feel .net web pages are not working fine i.e. .aspx etc try aspnet_regiis.exe -ir
    • Niels R.
      Niels R. over 14 years
      We are running a cluster of 3 front-end server with identical configuration and code base (virtual servers using HyperV). The server given problems stopped working after a few months. Symptoms: starting the web application results in the Application Pool being automatically disabled due to a series of failures in the process serving that application pool. In the Event Viewer there is a Error entry ".NET Runtime version : 2.0.50727.4927 - Application ErrorApplication has generated an exception that could not be handled." Restoring a backup of the code doesn't fix the error. Restarting neither.
    • Sam Cogan
      Sam Cogan over 14 years
      I would suggest trying what Vivek suggested, re-registered the framwork using aspnet_regiis.exe -ir
    • MikeT
      MikeT over 14 years
      appPool disables after failing for 5 times (due to rapid fail protection) means your application crashed multiple times. I would suggest you do some sort of debugging to see what is causing the appPool to crash.
  • Niels R.
    Niels R. over 14 years
    Thanks, I tried running the given command before asking my question and this resulted in "Windows Resource Protection did not find any integrity violations."
  • Niels R.
    Niels R. over 14 years
    That's what I was afraid of... I'll let Operations handle this, but I don't like the idea reconfiguring the whole server :p
  • TomTom
    TomTom over 14 years
    Should be not so hard. Save the IIS configuration ;) It is one file you can read out.