I have previously been able to successfully deploy to my computer an IIS application, which is written using the .NET 2.0 framework, that is deployed by using a Microsoft Setup project. As part of the setup project, it creates a new virtual directory for the IIS application.
Since the last successful deployment, I have installed the .NET 3.0 framework.
When I tried to deploy the project again, using the same setup project, I received the following error:
C:\windows\Microsoft.NET\Framework\v2.0.50727Aspnet_regiis.exe failed to set .net framework script map for W3SVC/1/Root/<virtual folder name> - aborting.
I found that after a bit of investigation that the registration of the .NET framework against IIS was not correct and was causing problems.
As my Web site still required to run under the .NET 2.0 framework, I re-registered the 2.0 framework against IIS, and successfully re-attempted the install.
.Net framework provides an Administration utility that manages the installation and uninstallation of multiple versions of ASP.NET on a single machine. You can find the file in C:\WINNT\Microsoft.NET\Framework\v**\aspnet_regiis.exe
To uninstall current asp.net version
use the command: aspnet_regiis.exe -u
To install current asp.net version
use the command: aspnet_regiis.exe -i