Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 5

Application Pool Creation destroys .Net applications

I really hoped it would be fixed with the new version:

If (on a Windows 2008 R2 Server for example) a new application pool is installed as a .net4 Pool, all installed applications or virtual directories assigned to a .net 2-Pool are reassigned to a .net 4 pool and can't run anymore.

Is there anyone, who has a good workaround?

Any help is really appreciated!

A fix from InstallShield would be the best...

Labels (1)
0 Kudos
(3) Replies
Level 10 Flexeran
Level 10 Flexeran

If you are seeing this issue, ensure that you are not setting the ASP.NET version for websites, applications, or virtual directories. Using this setting causes the aspnet_regiis.exe utility provided by the .NET 4.0 framework to update all application pools present on a target machine.

The appropriate method of controlling the ASP.NET version for IIS 7.x targets is through the .NET Framework Version setting on an application pool. This should be set as needed and the app pool associated with any websites or applications that need to run with this framework version.
0 Kudos
Level 5

My first testing were successful!

But deploying on a Windows 2003 Server is not, as I would need to set the ASP.Net-Version on the Virtual Directory.

And now?

Please help!
0 Kudos
Level 5

Here is a working solution:

Do not set any ASP.Net-Version in the application, create an application pool with the correct .net-Version (or use an existing one) and bind it to the application.
-> This works only for IIS >= 7

If you need to support previous IIS versions ->

create a custom action to set the correct windir and a custom action to execute the command.
If you use vbscript you can use these commands:

Dim ObjShell
Dim StrCommand
Dim windir
Set ObjShell = CreateObject("Wscript.Shell")
StrCommand = "cmd /c " + Session.Property("CustomActionData") + "\framework\v4.0.30319\aspnet_regiis.exe -s W3SVC/1/Root/my_application_name" StrCommand
set objShell = Nothing
0 Kudos