Visual Studio 2008 and IIS 7

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.


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:

This entry was posted in Web-design and tagged , , , . Bookmark the permalink.

4 thoughts on “Visual Studio 2008 and IIS 7”

  1. Geoff Sutton says:

    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?


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

  3. Akhil Wali says:

    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! 🙂

Leave a Reply

Warning: Parameter 1 to W3_Plugin_TotalCache::ob_callback() expected to be a reference, value given in /homepages/24/d373257762/htdocs/dragonblog/wp-includes/functions.php on line 3549