Wix 3.5 & IIS7 - WriteIIS7ConfigChanges Failed - Whilst attempting to install three web applications as virtual directories to default website

5

I'm hoping somebody could perhaps help me with a problem I'm experiencing using Wix 3.5.2519.0 on a Windows Server 2008 with the IIS7 & IIS6 Compatibility features installed.

The MSI log file

We are encountering the following errors whilst attempting to define three virtual web application directories beneath the default web site, as recorded using the /log <filename> option of msiexec.exe:

Action 17:05:57: StartIIS7ConfigTransaction. Starting IIS Config Transaction
Action 17:05:57: RollbackIIS7ConfigTransaction. Rolling back IIS Config Transaction
Action 17:05:57: CommitIIS7ConfigTransaction. Committing IIS Config Transaction
Action 17:05:57: ConfigureIIs7Exec. Configuring IIS
ConfigureIIs7Exec:  Error 0x800700b7: Failed get sites section
ConfigureIIs7Exec:  Error 0x800700b7: Failed to search for Website
ConfigureIIs7Exec:  Error 0x800700b7: Failed get sites section
ConfigureIIs7Exec:  Error 0x800700b7: Failed to search for Website
ConfigureIIs7Exec:  Error 0x800700b7: Failed get sites section
ConfigureIIs7Exec:  Error 0x800700b7: Failed to search for Website
Action 17:05:57: WriteIIS7ConfigChanges. Installing Config Keys and Values
WriteIIS7ConfigChanges:  Error 0x800700b7: Failed get sites section
WriteIIS7ConfigChanges:  Error 0x800700b7: Failed to read sites from config
WriteIIS7ConfigChanges:  Error 0x800700b7: Failed to configure IIS application.
WriteIIS7ConfigChanges:  Error 0x800700b7: WriteIIS7ConfigChanges Failed.
Action ended 17:05:57: InstallFinalize. Return value 3.
Action 17:05:57: Rollback. Rolling back action:
Rollback: Installing Config Keys and Values
Rollback: Configuring IIS
Rollback: Committing IIS Config Transaction
Rollback: Rolling back IIS Config Transaction

The Wix component declarations

There are three websites requiring installation, they are each declared with component xml syntax in the wxs file as follows (they're not identical but they're pretty close):

<Component Id="DataServiceVirtualDir" Guid="9AC00BDC-D710-429f-B68B-8130DB17C90C">
  <CreateFolder/>
  <iis:WebVirtualDir Id="OurApplicationDataService" 
                     Alias="OurApplicationDataService" 
                     Directory="DATASERVICEDIR" 
                     WebSite="OurApplicationDataService" 
                     DirProperties="OurApplicationDirProperties">
    <iis:WebApplication Id="OurApplicationDataService" Name="OurApplicationDataService">
    </iis:WebApplication>
  </iis:WebVirtualDir>
</Component>

The website declarations

Likewise, they are declared with the following website elements and supporting elements:

<iis:WebSite Id="OurApplicationDataService" Directory="DATASERVICEDIR" 
             Description="OurApplication Data Service">
  <iis:WebAddress Id="AllUnassignedData" IP="*" Port="80"/>
</iis:WebSite>

<iis:WebSite Id="OurApplicationSecurityService" Directory="SECURITYSERVICEDIR" 
             Description="OurApplication Security Service">
  <iis:WebAddress Id="AllUnassignedSecurity" IP="*" Port="80"/>
</iis:WebSite>

<iis:WebSite Id="OurApplicationProcessingFacades" Directory="PROCESSINGFACADESDIR" 
             Description="OurApplication Processing Facades">
  <iis:WebAddress Id="AllUnassignedFacades" IP="*" Port="80"/>
</iis:WebSite>

<iis:WebDirProperties Id="OurApplicationDirProperties" WindowsAuthentication="no" 
                      AnonymousAccess="yes" AnonymousUser="OurApplicationUserID" />

<iis:WebDirProperties Id="SecurityDirProperties" 
                      WindowsAuthentication="yes" AnonymousAccess="no" />

Summary and conclusions so far

So this mysterious installer error, 0x800700b7, appears to be screwing it all up.

Interestingly, an earlier iteration of the installer installed fine, and uninstalled fine several times previously. However, now when attempting to uninstall the previous installer and install the new installer, the uninstallation fails with exactly the same errors, literally the failing part of the uninstallation log file is near identical to the log section above.

If I copy the web application binaries into the desired installation directory and wire up a virtual directory manually via the IIS7 management console, it all works fine, and the websites respond to requests appropriately.

As far as I can tell, the IIS7 website and target installation directories are all empty, blank and otherwise sanitised in preperation for the installation.

Not much on Google about this one, I'm thinking I may just have to reinstall IIS7 on the box to see if it makes the problem go away, but that is the nuclear option so to speak.

Anybody any ideas?

Thanks in advance.

iis-7
wix
wix3.5
asked on Stack Overflow Jul 27, 2011 by Rabid

3 Answers

4

This might be a bit late since you already rebuilt the server, but I was getting this exact same error.

The ultimate cause of the error was the apppool was using the wrong version of .NET for my application. I solved it by assigning the application it's own app pool instead of using the default app pool on the server. You probably set the default apppool on your server to the version that your application required and that is why it worked in the end.

<Directory Id='WebAppFiles' Name='WebApp'>
<!-- The component to define the Virtual Directory.-->
<Component Id="WebVirtualDirApp"
    Guid="your-guide-goes-here">
    <!-- The virtual directory we are installing. -->
    <!-- The Alias attribute is the name thata will be put into IIS.-->
    <!-- The Directory attribute is the "Physical Path" property in
         IIS and needs to tie to an ID specified in the setup. -->
    <!-- The WebSite attribute ties to a <WebSite> element in the 
         setup file. As this is an example of installing into the 
         "Default Web Site" that element is not under a component.-->
    <iis:WebAppPool Id="YourWebAppPoolId" Name="YourWebAppPool" 
             ManagedRuntimeVersion="v2.0" />
    <iis:WebVirtualDir Id="VDirApp" Alias="[VDIRNAME]" 
             Directory="WebAppFiles" WebSite="DefaultWebSite">
        <!-- Turn the Virtual Directory into a web application. -->
        <iis:WebApplication Id="TheWebApplication"  
            WebAppPool="YourWebAppPoolId"
            Name="[VDIRNAME]" />
    </iis:WebVirtualDir>
    <!-- This is pretty important. If the CreateFolder isn't there the
         WebVirtualDir won't get created as there's no files in this
         component.
         http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg03483.html -->
    <CreateFolder/>                 
</Component>
</Directory>
answered on Stack Overflow Feb 24, 2012 by Great Turtle • edited Feb 24, 2012 by Great Turtle
2

I've recently been struggling with a similar error; the main difference being that we had app pools mentioned in the "WriteIIS7ConfigChanges" errors as well. A lot of searching online (how I came across this post) suggests that your issue could have been due to various bugs that have since been fixed by Wix. We are using Wix 3.7.1119.0, however, the most recent RC as of the time of writing, so there is at least one other way to get this error.

What I ultimately found was that some unrelated permissions issues were causing our install to fail, and then the rollback was also silently failing on one of the steps, messing up the server configuration. We were inserting

<system.transactions><machineSettings maxTimeout="00:30:00"/><defaultSettings timeout="00:30:00"/></system.transactions>

into C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\machine.config, but the rollback step that was supposed to remove it was erroring out with an "access is denied" message. Any install attempt after that initial failed attempt resulted in the ConfigureIIS7Exec errors. Going in and manually removing the transaction timeout settings from machine.config caused the "Failed to search for Website" error to go away, and our install to complete successfully once more.

answered on Stack Overflow Dec 14, 2012 by sugaredlightning
2

I ran into this, too. I was seeing the following messages in my install logs:

MSI (s) (B8:74) [11:11:24:699]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICF14.tmp, Entrypoint: WriteIIS7ConfigChanges
WriteIIS7ConfigChanges:  Error 0x80070002: Failed get AnonymousAuthentication section for DirProp
WriteIIS7ConfigChanges:  Error 0x80070002: Failed set Authentication for DirProps
WriteIIS7ConfigChanges:  Error 0x80070002: Failed to configure IIS DirProperties.
WriteIIS7ConfigChanges:  Error 0x80070002: WriteIIS7ConfigChanges Failed.

I opened up IIS Manager, and when I clicked on the site that I was trying to install to, I got an error about the / pointing to an invalid directory.

I clicked on sites -> went to the right pane, right-clicked on the site in question, and both "Application Pool" and "Physical Path" were blank. As soon as I set those and applied the changes, I was able to go forward just fine. No idea how my Default Web Site config got borked, but fixing it under IIS Manager resolved the issue.

answered on Stack Overflow Oct 29, 2013 by Lynn Crumbling

User contributions licensed under CC BY-SA 3.0