Registering ASP.NET site in IIS with Wix

2

I'm trying to register a website in IIS Express 8. (The installer also copies the whole site.) The installer does not complete, but does a rollback. I've tried many different things, but now I'm using this code:

    <DirectoryRef Id="INSTALLFOLDER">
  <Directory Id="dir9D67924259071A1E6E852735371F1592" Name="MyWebsiteRoot">
    <Component Id="IISConfiguration" Guid="DAF91C85-A210-479A-B47C-163F61D6CBB1" KeyPath="yes">
      <iis:WebAppPool Id="WebAppPoolId" Name="MyWebSiteAppPool" ManagedPipelineMode="Integrated" Identity="applicationPoolIdentity" ManagedRuntimeVersion="v4.0" />
      <iis:WebSite Id="WebSiteId" Description="MyWebSite" AutoStart="yes" StartOnInstall="yes" Directory="dir9D67924259071A1E6E852735371F1592" >
        <iis:WebAddress Id="WebAddressId" IP="localhost" Port="80" />
        <iis:WebVirtualDir Id="WebVirtualDirId" Alias="/" Directory="dir9D67924259071A1E6E852735371F1592">
          <iis:WebApplication Id="WebApplicationId" Name="My Web Site" WebAppPool="WebAppPoolId" />
        </iis:WebVirtualDir>
      </iis:WebSite>
    </Component>
    ...

I have been using the Wixtoolset documentation for this and some online tutorials, but they are mostly code examples and don't really explain that much. I also found nothing on this in the WiX 3.6- A Developer's Guide to Windows Installer XML. So I'm a bit stuck here.

These are some errors I can see in the log:

Action 11:12:08: WriteIIS7ConfigChanges. Installing Config Keys and Values
MSI (s) (44:54) [11:12:08:179]: Executing op: CustomActionSchedule(Action=WriteIIS7ConfigChanges,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
MSI (s) (44:64) [11:12:08:210]: Invoking remote custom action. DLL: C:\Windows\Installer\MSI60AC.tmp, Entrypoint: WriteIIS7ConfigChanges
WriteIIS7ConfigChanges:  Error 0x80040154: Failed to open AppHostWritableAdminManager to configure IIS7
WriteIIS7ConfigChanges:  Error 0x80040154: WriteIIS7ConfigChanges Failed.
CustomAction WriteIIS7ConfigChanges returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 11:12:08: InstallFinalize. Return value 3.
...
RollbackIIS7ConfigTransaction:  Failed to restore applicationHost, not found - continuing
RollbackIIS7ConfigTransaction:  Error 0x80070003: failed to delete config backup
CustomAction RollbackIIS7ConfigTransaction returned actual error code 1603 but will be translated to success due to continue marking
Rollback: Starting IIS Config Transaction

I tried repairing IIS and also to just install a WebAppPool but that rollbacks too.

Update

It seems to be a problem with IIS Express, since I don't have problems when IIS is installed. I'll find out if I can fix this.

asp.net
iis
wix
wix3.8
asked on Stack Overflow Sep 8, 2014 by Aaron • edited Sep 9, 2014 by Aaron

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0