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

How create .net4 application for IIS6 AND IIS7

Isn't it really impossible to create in Installation which
- works fine for IIS6 and IIS7 with .net4?

Since more than 2 months I can't get solved this problem:

I create an application pool assigned to .Net4
I create an application running in this application.

Here's the problem:

IIS6 needs to have ASP.Net-Version set to 4.0.30319
IIS7 needs to have this entry empty.

If not blank on IIS7 installation creates a couple of new app pools with and assigns already running applications to this new pools regardless of their previous assingments.

All proposed solution aren't working!

Anyone any idea to get out of this?
Labels (1)
0 Kudos
(1) Reply
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