Many times we come across incompatibility of ASP.NET application version and ASP.NET version installed by default on the production machine. I came across this issue twice today browsing the net. It can be either ASP.NET 1.1 application which is about to be installed on IIS with only ASP.NET 2.0 installed or 32 bit application which is about to be installed on 64 bit machine or whatever.
In the forums and all over the search engines the most common solution (for almost 5 years) is to use aspnet_regiis -i in order to re-register ASP.NET on the machine. aspnet_regiis -i is quoted many times in FAQ sections of technology forums.
However it will be bad practices to use "-i" switch since it installs the specific version of ASP.NET and registers script maps to the root of the default Web Site and recursively to all virtual directories below the root. This way it can break existing applications installed or others that will be installed in the future.
The right way to use aspnet_regiis in order to update script maps for the specific installed application will be like so:
- aspnet_regiis -ir -enable - Installs ASP.NET version with root and enables it.
- aspnet_regiis -s path - Registers script map for our Application.
This way our registration will not affect other applications on the machine.
Sunday, July 15, 2007 12:55 AM