Thursday, February 9, 2012

Repairing an ASP.Net installation for IIS7

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.0x86c:\Windows\Microsoft.NET\Framework\v2.0.50727\
    ASP.Net v4.0x86c:\Windows\Microsoft.NET\Framework\v4.0.30319\
    ASP.Net v2.0x64c:\Windows\Microsoft.NET\Framework64\v2.0.50727\
    ASP.Net v4.0x64c:\Windows\Microsoft.NET\Framework64\v4.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.

No comments:

Post a Comment