Wednesday, September 27, 2006

Incompatible .Net Framework Version in IIS

Situation:
Having a ASP.NET project written in VS .Net 2003. Apparently the codes version is based on ASP.NET 1.1.

Problem:
The Windows Server 2003 is installed with MS .Net Framework 2.0. This should be due to the windows Auto Update because the OS comes with .Net Framework 1.0 initially. Some of the codes failed to run properly and throwing up strange error. Cannot downgrade the .Net version.

Diagnosis:
I can't uninstall .Net Framework 2.0 from the server because there're a few application depending on it. One of the common application is MS SQL Server 2005. Therefore, both frameworks need to be co-exist. Unfortunately, there's no option to switch the ASP.NET version in the server IIS. I managed to have that feature in Windows XP when i installed version 1.1 follows by 2.0. I have tried reinstall 1.1 Framework but errors indicated the framework has already been installed in the system.

Resolution:
Force the OS to install Framework 1.1 by:
1. open cmd, go to C:\WINDOWS\Microsoft.NET\Framework\
2. Type
aspnet_regiis.exe -i
-i - Reinstall corresponding framework version
3. In case you want to uninstall Framework 2.0,
type aspnet_regiis.exe -u
-u - Uninstall this version of ASP.NET. Existing script maps to this version are remapped to highest remaining version of ASP.NET installed on the machine.

After i reinstall .Net Framework 1.1, now i can switch the ASP.NET version by right click properties of the virtual directory, then press on ASP.NET tab, select version 1.1 instead of 2.0 from the
ASP.NET version dropdown. Finally enable the ASP.NET 1.0 web service and you are done.

No comments: