Windows 2008 & Visual Studio Web Setup: The installer was interrupted before ApplicationName could be installed
Although how much I hate creating setup packages, I had to create a few setups for some of my projects recently. While I was working on setup projects, I found that, the capabilities of Visual Studio Setup & Deployment projects are shockingly limited, and not to mention I faced a lot of issues while creating setup projects in Visual Studio. Few people suggested me to use WiX. WiX certainly is good and far more flexible solution for building Windows Installer Setup Packages, but it has got a very steep learning curve.
I will be making few posts in future about the problems, that I faced during my experience creating setup packages using Visual Studio. So, here you go. Here is the first problem.
The Problem
I was working on a simple Web Setup project in Visual Studio 2008. The setup worked fine in XP & Windows 2003 server. But, when I tried installing the setup in Windows Server 2008, I got this nice error message that said. “The installer was interrupted before <MyApplicationName> could be installed. You need to restart the installer to try again.”
Having faced many problems earlier with msi packages, I at least knew how to start the msi package in verbose mode to create the log files.
Launch your msi in verbose mode:
msiexec /i yoursetup.msi /lv "C:\yourdirectory\logfile.txt"
I searched for terms like “ERROR” & “FATAL” in the log file
. I got this.
Action ended 15:57:43: WEBCA_MYSETUPTARGETVDIR. Return value 1. MSI (c) (8C:20) [15:57:43:204]: Doing action: WEBCA_SetTARGETSITE Action start 15:57:43: WEBCA_SetTARGETSITE. MSI (c) (8C:20) [15:57:43:206]: Note: 1: 2235 2: 3: ExtendedType 4: SELECT `Action`,`Type`,`Source`,`Target`, NULL, `ExtendedType` FROM `CustomAction` WHERE `Action` = 'WEBCA_SetTARGETSITE' MSI (c) (8C:A0) [15:57:43:226]: Invoking remote custom action. DLL: C:\Users\ADMINI~1\AppData\Local\Temp\1\MSI4225.tmp, Entrypoint: SetTARGETSITE INFO : [03/31/2010 15:57:43:286] [SetTARGETSITE ]: Custom Action is starting... INFO : [03/31/2010 15:57:43:287] [SetTARGETSITE ]: CoInitializeEx - COM initialization Apartment Threaded... ERROR : [03/31/2010 15:57:43:290] [SetTARGETSITE ]: FAILED: -2147221164 ERROR : [03/31/2010 15:57:43:291] [SetTARGETSITE ]: Custom Action failed with code: '340' INFO : [03/31/2010 15:57:43:293] [SetTARGETSITE ]: Custom Action completed with return code: '340' Action ended 15:57:43: WEBCA_SetTARGETSITE. Return value 3. MSI (c) (8C:20) [15:57:43:297]: Doing action: FatalErrorForm Action start 15:57:43: FatalErrorForm.
I could see that the action WEBCA_SetTARGETSITE was failing. But I had not idea what was wrong, except that the term itself said Set Target Site failed. So I turned up to Google and landed on this blog post.
So the real problem is that my setup is unable to get the “Default Web Site” from IIS7.
The Solution
I installed the “IIS6 Metabase Compatibility” role using Role Manager as mentioned in the blog post and my setup started working. Existing software & scripts can interface with IIS7 only if the Metabase compatibility component is installed in IIS7.
Thanks to Galin Iliev.
Possible Related Posts:
- ASP.NET WebApplication Fails To Load In Visual Studio 2008 After Upgrading In Visual Studio 2010
- Visual Studio 2010 Beta 2 Now Out For Public
- Visual Studio 2010: Installing MSDN Documentation
- Visual Studio 2010 Dark Expression Blend Color Theme
- MSBuild Context Menu: Build .NET Project/Solution From Explorer
Thanks for this useful hint. You saved me a lot of time for troubleshooting this issue.
Lippi
[ Reply ]
Matthias Lippmann
8 Jun 10 at 9:54 am
Thanks dude… u really saved me!
[ Reply ]
Chit Min Maung
29 Oct 10 at 1:35 am
Thanks. This helped a lot.
To install it you need to go to Server Management -> Roles -> Web Server (IIS) -> Right click -> Add Role Services.
Under tree view -> Management Tools -> IIS 6 Management Compatibility -> IIS 6 Metabase Compatibility
[ Reply ]
Ben
1 Nov 10 at 9:33 am
Wow! If I could buy you a beer, I certanly would believe me!
Thanks a lot. This issue was driving me crazy.
[ Reply ]
Mau
25 Nov 10 at 10:45 pm
Awsome, you rock!!!!!
[ Reply ]
M'Lu
1 Dec 10 at 10:21 am
Thanks buddy, really useful information. Worked like a charm!!
[ Reply ]
Seema Shiman
2 Mar 11 at 6:42 pm
Awesome! It worked great!
[ Reply ]
Sekhar
19 Apr 11 at 12:13 pm
Good work man….thnx
[ Reply ]
SureshKumar
15 Jul 11 at 1:09 am
Thanks! I spent several hours trying to figure this one out. While it’s one thing to read the log, it’s a whole different thing to find a solution to the problem.
Kudos,
Tom
[ Reply ]
Tom
25 Jul 11 at 12:47 pm
Thank you!!!
[ Reply ]
Erin
27 Oct 11 at 9:29 pm
Thanks. It seems odd that a VS2008 Web Setup Project will not install onto a W2K8 Server without older IIS6 compatibility installed. I presume that the VS2008 version of the installer isn’t using the WebAdministration library and they haven’t redesigned it to use e.g. WMI to interact with IIS 7. Just as well this is only a test harness I’m trying to install. The VS2008 Web Setup Project is rubbish anyway. We install a website as part of our main product and resorted to using a normal Setup Project and an InstallHelper class to set up IIS7.
[ Reply ]
pridmorej
26 Jan 12 at 5:57 am