PDA

View Full Version : Application Pool Creation destroys .Net applications



eseilram
09-12-2011, 09:03 AM
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...

Thx

joshstechnij
09-12-2011, 12:44 PM
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.

eseilram
09-13-2011, 01:13 AM
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!

eseilram
09-23-2011, 01:28 AM
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") + "microsoft.net\framework\v4.0.30319\aspnet_regiis.exe -s W3SVC/1/Root/my_application_name"
ObjShell.run StrCommand
set objShell = Nothing