Microsoft IIS ASP.NET Script Map Configuration

The script mapping is the mechanism to map the .ASPX file extension for a specific Web application to a version of the .NET Framework.

To check the current script map configuration (i.e. to list the keys):

aspnet_regiis –lk


W3SVC/  1.1.4322.0

W3SVC/1/ROOT/Printers/  1.1.4322.0

W3SVC/1/ROOT/MSPetShop/ 1.1.4322.0

W3SVC/1/ROOT/MyApp1/    1.1.4322.0

W3SVC/1/ROOT/MyApp2/    2.0.40607.0

The version of ASP.NET that owns the root script map configuration is the one with “W3SVC/”.  If a virtual directory is not listed here is means that it inherits the root script map configuration.

To specify the script map of a particular virtual directory (i.e. specify which version of ASP.NET to use):

aspnet_regiis –sn <path>

For example, running version 3.0 of aspnet_regiis changes MyApp2 so that is uses ASP.NET 3.0 instead of version 2.0:

aspnet_regiis –sn “W3SVC/1/ROOT/MyApp2”

To remove a script map for a specific virtual directory:

aspnet_regiis –kn <path>

See Also

Configuring the Microsoft .NET Framework

Deploying Applications with the Deployment Wizard

Manually Deploying an Application to a Production Server