Sunday, December 25, 2005

Aspnet_Regiis.exe

After doing a fresh installation of Visual Studio.NET in myWindow XP machine I was trying to open a sample application in ASP.NET.But VS was giving an error.

"The specified server is not running .NET 1.1"

And the solution :

go to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 and execute aspnet_regiis -i I got .NET 1.1 installed.. Now everything is working fine.

The generalized path for aspnet_regiis is :

[Drive] :\[Windowsfolder]\Microsoft.NET\Framework\[Version]

Now what is this utility for ?

simply aspnet_regiis.exe is "ASP.NET IIS Registration Tool "

There may be different versions of .NET installed in a machine and the ASP.NET ISAPI version mapped to an ASP.NET application determines which version of the common language runtime is used for the application.An ASP.NET application is associated with an ASP.NET ISAPI version through a script map in IIS.Aspnet_regiis.exe allows the admin easily update the script maps for an ASP.NET application to point to the ASP.NET ISAPI version associated with the tool.

The tool is also used for

1.To display all installed versions of .NET
2.Register .NET versions coupled with the tool
3.Create client script directories
4.Perform other configurations.

Usage: aspnet_regiis.exe [-i[r] [-enable] -u[a] -r -s[n] -k[n]> -lv -lk -c -e[a] -?]
-i - Install this version of ASP.NET and update scriptmaps at the IIS metabase root and for all scriptmaps below the root. Existing scriptmaps of lower version are upgraded to this version.
-ir - Install this version of ASP.NET, register only. Do not update scriptmaps in IIS.
-enable - When -enable is specified with -i or -ir, ASP.NET will also be enabled in the IIS security console (IIS 6.0 or later).
-s - Install scriptmaps for this version at the specified path, recursively. Existing scriptmaps of lower version are upgraded to this version.
E.g. aspnet_regiis.exe -s W3SVC/1/ROOT/SampleApp1
-sn - Install scriptmaps for this version at the specified path, non-recursively. Existing scriptmaps of lower version are upgraded to this version.
-r - Install scriptmaps for this version at the IIS metabase root and for all scriptmaps below the root. All existing scriptmaps are changed to this version, regardless of current version.
-u - Uninstall this version of ASP.NET. Existing scriptmaps to this version are remapped to highest remaining version of ASP.NET installed on the machine.
-ua - Uninstall all versions of ASP.NET on the machine
-k - Remove all scriptmaps to any version of ASP.NET from the specified path, recursively. E.g. aspnet_regiis.exe -k W3SVC/1/ROOT/SampleApp1
-kn - Remove all scriptmaps to any version ASP.NET from the specified path, non-recursively.
-lv - List all versions of ASP.NET that are installed on the machine, with status and installation path. Status: Valid[ (Root)]Invalid
-lk - List all the path of all IIS metabase keys where ASP.NET is scriptmapped, together with the version. Keys that inherit ASP.NET scriptmaps from a parent key will not be displayed.
-c - Install the client side scripts for this version to the aspnet_client subdirectory of each IIS site directory.
-e - Remove the client side scripts for this version from the aspnet_client subdirectory of each IIS site directory.
-ea - Remove the client side scripts for all versions from the aspnet_client subdirectory of each IIS site directory.
-? - Print this help text.

A unique version of Aspnet_regiis.exe is included with each version of the .NET Framework. Since each version of the tool is applicable only to its associated version of the .NET Framework, be sure to use the appropriate version of the tool to configure an ASP.NET application.