Deploying ASP.Net applications is always fun when it comes to packages which are more complex then usual and require additional actions taken and this one is not an exception.

I think this topic run into the ground, but it seems to come back again and again. I guess the reason for that is “default” state set for the environment…

After upgrade of operating system to Vista IIS 7 would be installed. This brings some “inconveniences” into usual development process. Aside from worrying about disabling UAC, few other things usually breaks.

One of them is that setup package for ASP.Net application created in Visual Studio starts to fail with the error that installer session closed improperly and process has to be restarted (or similar).

If we look into installer log (check here on how to enable debug mode) the following error could be found:

Action 11:18:53: WEBCA_SetTARGETSITE.
Action start 11:18:53: WEBCA_SetTARGETSITE.
MSI (c) (B4:A4) [11:18:53:657]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = ‘WEBCA_SetTARGETSITE’
MSI (c) (B4:A4) [11:18:53:661]: Creating MSIHANDLE (1) of type 790542 for thread 4260
MSI (c) (B4:4C) [11:18:53:662]: Invoking remote custom action. DLL: C:\Users\SDOSYU~1\AppData\Local\Temp\MSI2978.tmp, Entrypoint: SetTARGETSITE
MSI (c) (B4:F0) [11:18:53:666]: Cloaking enabled.
MSI (c) (B4:F0) [11:18:53:666]: Attempting to enable all disabled privileges before calling Install on Server
MSI (c) (B4!14) [11:18:53:726]: Creating MSIHANDLE (2) of type 790531 for thread 4116
INFO   : [01/02/2009 11:18:53:726] [SetTARGETSITE ]: Custom Action is starting…
INFO   : [01/02/2009 11:18:53:727] [SetTARGETSITE ]: CoInitializeEx – COM initialization Apartment Threaded…
ERROR  : [01/02/2009 11:18:53:729] [SetTARGETSITE ]: FAILED: -2147221164
ERROR  : [01/02/2009 11:18:53:730] [SetTARGETSITE ]: Custom Action failed with code: ‘340’
INFO   : [01/02/2009 11:18:53:731] [SetTARGETSITE  ]: Custom Action completed with return code: ‘340’

Very informational… Who would guess that it simply comes to support for IIS 6 API. In IIS 7 it called “IIS 6 Management compatability”.

Usually this module is not installed by default and we have to actually enable it.
Very simple and very quick solution is to go “Control Panel\Programs and Features\Turn Windows features on or off” and then click the check box.

iis7support

There is one more problem which may be encountered on 64 bit machine – support for 32 bit assemblies is disabled by default. To reenable, change Application Pool Defaults for your IIS 7 installation:
32bitaspon64bitos


4 Comments

Geoff Sutton · May 13, 2009 at 14:07

Hi.  thanks for this article, it solved a huge issue migrating from Server 2003 to Server 2008 and IIS 7.  Once I enabled 32 bit applications I could view the top level of our reports. However, as soon as a user tries to drill down in the report, the page comes up blank.  Have you any information on what could be causing this, and what the solution might be?

Thanks,
Geoff

Serguei Dosyukov · May 13, 2009 at 15:58

Could it be that security settings are not propagated for sub-reports?

Akhil Wali · Nov 6, 2012 at 00:59

This post really helped me fix a similar problem where the error only occurs if I’m using a custom action.
Thanks for the help! 🙂

JuanLu, ElGuerre : Asp.Net Projects in Visual Studio 2008 & IIS7 · Feb 28, 2009 at 05:55

[…] Tampoco soy el único con este caso o similar; Visual Studio 2008 and IIS 7. […]

Leave a Reply