wixtoolset / issues

WiX Toolset Issues Tracker
http://wixtoolset.org/
130 stars 24 forks source link

Error 0x80070057: WriteIIS7ConfigChanges Failed when setting WebAppPool identity. #5451

Open TheCycoONE opened 7 years ago

TheCycoONE commented 7 years ago

My code is:

     <Component Id="C.WebSite" Guid="{ffd99df6-8b39-446c-85de-d50f30a97479}">
        <RegistryKey Root="HKLM" Key="SOFTWARE\ERMS">
          <RegistryValue Id="RV.Hostname"
                         Action="write"
                         Type="string"
                         Name="Hostname"
                         Value="[HOSTNAME]"
                         KeyPath="yes" />
        </RegistryKey>

        <util:User Id="USR.CFService"
                   Name="cfservice"
                   Domain="[COMPUTERNAME]"
                   Password="[CFSERVICE_PASSWORD]"
                   CreateUser="yes"
                   FailIfExists="no"
                   Vital="yes"
                   LogonAsService="yes"
                   UpdateIfExists="yes"
                   PasswordNeverExpires="yes"
                   CanNotChangePassword="yes" />

        <util:User Id="USR.WwwService"
                   Name="wwwservice"
                   Domain="[COMPUTERNAME]"
                   Password="[WWWSERVICE_PASSWORD]"
                   CreateUser="yes"
                   FailIfExists="no"
                   Vital="yes"
                   LogonAsService="yes"
                   UpdateIfExists="yes"
                   PasswordNeverExpires="yes"
                   CanNotChangePassword="yes" />

        <iis:WebSite Id="IWS.ErmsWebSite"
                     Description="ERMS"
                     SiteId="10"
                     AutoStart="yes"
                     ConfigureIfExists="yes"
                     Directory="INSTALLDIR"
                     StartOnInstall="yes">
          <!-- TODO: Header hostname must be dynamic (chosen in installer) -->
          <iis:WebDirProperties Id="IWDP.ErmsWebSite" ClearCustomError="no" />
          <iis:WebAddress Id="IWA.ErmsHttpBinding" Header="[HOSTNAME]" Port="80" Secure="no" />
          <iis:WebAddress Id="IWA.ErmsHttpsBinding" Header="[HOSTNAME]" Port="443" Secure="yes"/>
          <iis:MimeMap Id="IMM.ErmsBar" Extension=".bar" Type="application/octet-stream" />
          <iis:WebVirtualDir Id="IVD.VirtualDir" Alias="/" Directory="INSTALLDIR" >
          </iis:WebVirtualDir>
          <iis:WebDir Id="IWD.Root" Path="/">
            <iis:WebDirProperties Id="IWDP.Root" />
          </iis:WebDir>
        </iis:WebSite>
        <iis:WebAppPool Id="IWAP.ErmsWeb" Name="ErmsWebAppPool" ManagedPipelineMode="Integrated" ManagedRuntimeVersion="v4.0" Identity="other" User="USR.WwwService" />
        <iis:WebAppPool Id="IWAP.ErmsSoap" Name="ErmsSoapAppPool" ManagedPipelineMode="Integrated" ManagedRuntimeVersion="v4.0" />
        <iis:WebAppPool Id="IWAP.ErmsMobileHook" Name="ErmsMobileHookAppPool" ManagedPipelineMode="Integrated" ManagedRuntimeVersion="v4.0" />
      </Component>

I keep getting an error:

    MSI (s) (C4:60) [16:11:21:967]: Executing op: CustomActionSchedule(Action=WriteIIS7ConfigChanges,ActionType=11265,Source=BinaryData,Target=**********,CustomActionData=**********)
    MSI (s) (C4:84) [16:11:21:969]: Invoking remote custom action. DLL: C:\Windows\Installer\MSICD86.tmp, Entrypoint: WriteIIS7ConfigChanges
    WriteIIS7ConfigChanges:  Error 0x80070057: Failed to Commit IIS Config Changes
    WriteIIS7ConfigChanges:  Error 0x80070057: WriteIIS7ConfigChanges Failed.
    CustomAction WriteIIS7ConfigChanges returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
    Action ended 16:11:22: InstallFinalize. Return value 3.

The error does not happen if I just remove the Identity and User attribute from the iis:WebAppPool. I expect that after the upgrade the pools identity would be changed to the newly created user.

dghalbr commented 7 years ago

I believe I may be running into a similar issue. Is there an ETA or any other information on this? WiX Toolset v3.10.2.2516 Vistual Studio Professional 2012 Version 11.0.50727.1 RTMREL .NET 4.6 Windows Server 2012 R2 Running a Major Upgrade that uninstalls the previous App and then Attempts to Reinstall the new App, setting up IIS the same way as on install.

robmen commented 7 years ago

This issue is open and unassigned. That means it is waiting for someone to investigate the root problem, discuss possible solutions to that problem then implement the decided solution.

If you are interested in doing so yourself, our developer documentation provides a great checklist for getting started.

If you are not interested then you are waiting for someone else to become interested. If this issue has been open for a long time then there probably isn't much interest in this particular issue. In that case, you'll want to consider how to motivate others to fix it for you. This is a pretty good list of support options.

awpope commented 6 years ago

We had an issue like this. Turns out our property name was mis-named and we ended up passing null into the function that tries to set it.