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

Open
TheCycoONE opened this Issue Dec 8, 2016 · 0 comments

Projects

None yet

2 participants

@TheCycoONE
  • Which version of WiX are you building with?
    3.10.3.3007

  • Which version of Visual Studio are you building with (if any)?
    Visual Studio Professional 2015 Version 14.0.25431.01 Update 3

  • Which version of .NET are you building with?
    4.6

  • If the problem occurs when installing your packages built with WiX, what is the version of Windows the package is running on?
    Windows Server 2008 R2

  • Describe the problem and the steps to reproduce it.
    I have an existing WiX installer, and I am trying to through a Major Upgrade change the identity our WebAppPools are using.

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.

@barnson barnson added this to the v3.x milestone Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment