This will more often than not fix many obscure and just plain ridiculous errors that IIS7 somehow manifests. I have worked with IIS7 plenty and I have seen it melt down plenty of times for which I will say aren’t very good reasons. IIS7 is special…

Anyhow, to fix a what may seem damaged ASP.Net installation 2.0/4.0 do the following:

  1. Navigate to your flavor of .Net and CPU architecture directory using CMD or powershell:
    ASP.Net v2.0 x86 c:\Windows\Microsoft.NET\Frameworkv2.0.50727\
    ASP.Net v4.0 x86 c:\WindowsMicrosoft.NET\Frameworkv4.0.30319\
    ASP.Net v2.0 x64 c:\WindowsMicrosoft.NET\Framework64v2.0.50727\
    ASP.Net v4.0 x64 c:\WindowsMicrosoft.NET\Framework64v4.0.30319\
  2. Enter this command: “aspnet_regiis –r”

Extra Precaution
When I did this repair once, specifically for .Net 4.0 I had a very unhappy surprise. All of my app pools that were running in 2.0 were magically changed to 4.0. That being said, as an extra precaution, Open up the IIS Manager and change all your APP Pools that were using 2.0, from 4.0 back to 2.0 since that repair command takes the liberty of changing all of the app pools without asking.

FYI: This won’t work for IIS8+ (09/12/2017)

Leave a Reply

Your email address will not be published. Required fields are marked *