Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed while processing WebSites #544

Closed
Xaddan opened this issue Dec 4, 2018 · 3 comments
Closed

Failed while processing WebSites #544

Xaddan opened this issue Dec 4, 2018 · 3 comments

Comments

@Xaddan
Copy link
Contributor

Xaddan commented Dec 4, 2018

Hi Oler.

I have problems installing a website:

ConfigureIIs7Exec:  Entering ConfigureIIs7Exec in C:\Windows\Installer\MSIB01E.tmp, version 3.11.2318.0
ConfigureIIs7Exec:  Skipping ScaWebSvcExtRead() because IIsWebServiceExtension data not present
ConfigureIIs7Exec:  Skipping ScaAppPoolRead() - required table not present
ConfigureIIs7Exec:  Skipping ScaMimeMapRead() - required table not present
ConfigureIIs7Exec:  Skipping ScaHttpHeaderRead() - required tables not present.
ConfigureIIs7Exec:  Skipping ScaWebErrorRead() - required tables not present.
ConfigureIIs7Exec:  Entering ScaWebsRead7()
ConfigureIIs7Exec:  Error 0x8007007a: Failed to copy component string to web object
ConfigureIIs7Exec:  Exiting ScaWebsRead7()
ConfigureIIs7Exec:  Error 0x8007007a: failed while processing WebSites
MSI (s) (D4!14) [12:12:53:929]: Product: WebClient -- Error 26002. Failed while processing WebSites.   (-2147024774         )

Error 26002. Failed while processing WebSites.   (-2147024774         )

My code:

new IISVirtualDir
{
  Name = "O2k-Web-VirtualDir",
  WebSite = new WebSite("O2k-Web")
  {
    InstallWebSite = true,
    Description = "O2k-Web",
    Addresses = new[]
    {
      new WebSite.WebAddress
      {
        Address = "[SERVER_IP_ADDRESS]",
        Attributes = new Attributes
        {
          { "Port", "[SQL_PORT]" }
        }
      }
    }
  }
}

What was generated:

<Component Id="Component.VirtDir.INSTALL_LOCATION_WEB_CLIENT.73b54ea9868e40a2992c358ffbba5f" Guid="*-*-*-*-*" Win64="yes" KeyPath="yes">
  <iis:WebVirtualDir Id="VirtDir" Alias="O2k-Web-VirtualDir" Directory="INSTALL_LOCATION_WEB_CLIENT" WebSite="WebSite">
    <iis:WebApplication Id="MyWebAppWebApplication" Name="MyWebApp" />
  </iis:WebVirtualDir>

  <iis:WebSite Id="WebSite" Description="O2k-Web" Directory="INSTALL_LOCATION_WEB_CLIENT">
    <iis:WebAddress Id="WebSite_Address1" IP="[SERVER_IP_ADDRESS]" Port="[SQL_PORT]" />
  </iis:WebSite>
  <RemoveFolder Id="INSTALL_LOCATION_WEB_CLIENT" On="uninstall" />
</Component>
@Xaddan
Copy link
Contributor Author

Xaddan commented Dec 4, 2018

This error is observed only on version 1.9.1. I rolled back to version 1.6.4.3, and there is no such error.
What was created by version 1.6.4.3:

<Component Id="Component.INSTALL_LOCATION_WEB_CLIENT.VirtDir" Guid="*-*-*-*-*" Win64="yes" KeyPath="yes">
  <iis:WebVirtualDir Id="VirtDir" Alias="O2k-Web-VirtualDir" Directory="INSTALL_LOCATION_WEB_CLIENT" WebSite="WebSite">
    <iis:WebApplication Id="MyWebAppWebApplication" Name="MyWebApp" />
  </iis:WebVirtualDir>

  <iis:WebSite Id="WebSite" Description="O2k-Web" Directory="INSTALL_LOCATION_WEB_CLIENT">
    <iis:WebAddress Id="WebSite_Address1" IP="[SERVER_IP_ADDRESS]" Port="[SQL_PORT]" />
  </iis:WebSite>
  <RemoveFolder Id="INSTALL_LOCATION_WEB_CLIENT" On="uninstall" />
</Component>

Looks like a long ID: Component.VirtDir.INSTALL_LOCATION_WEB_CLIENT.73b54ea9868e40a2992c358ffbba584f

@Xaddan
Copy link
Contributor Author

Xaddan commented Dec 4, 2018

To solve the problem, I used: Compiler.AutoGeneration.ForceComponentIdUniqueness = false;

@oleg-shilo
Copy link
Owner

oleg-shilo commented Dec 5, 2018

It is an interesting one.

If the problem indeed caused by the too long component ID then indeed ForceComponentIdUniqueness = false may shorten it. Though it is disabled by default anyway:

image

BTW there are also other ways of controlling the ID allocation. You can pass the explicit ID for dir:

new Dir(new Id("AdminWebDir"), "AdminWeb",
        new IISVirtualDir
        {
            Name = "MyWebApp",
. . .

will generate

<Component Id="Component.AdminWebDir.VirtDir" Guid="6fe30b47-2577-43ad-9095-1861c12f314b" KeyPath="yes">
<WebVirtualDir Id="VirtDir.2" Alias="MyWebApp2" Directory="WebDir" WebSite="WebSite.1" xmlns="http://schemas.microsoft.com/wix/IIsExtension">
  <WebApplication Id="Test2WebApplication" Name="Test2" WebAppPool="MyWebApp2_AppPool" />
</WebVirtualDir>

There is even another way of controlling Component.Id directly but it is currently is not enabled for IISVirtualDir. That's why I have marked this post as enhancement and in the next release controlling Component id will also be possible via IISVirtualDir attributes:

new Dir("AdminWeb",
        new IISVirtualDir
        {
            Name = "MyWebApp",
            AttributesDefinition = "Component:Id=Component.AdminWeb"

oleg-shilo pushed a commit that referenced this issue Dec 5, 2018
@Xaddan Xaddan closed this as completed Jan 18, 2019
oleg-shilo pushed a commit that referenced this issue Jan 19, 2019
* VS project templates - added packages.config files
* Added Condition-s for .NET Frameworks 4.7.1 and 4.7.2
* Issue #569: Updating WixSharp leads to malfuncion of SetEvVar
* Added support for `UI.Error` WiX element
* Issue #552: Question: Install 2 windows services in same installer
* Issue #541: Installing 2 Services in the same installer results in …
* Samples update
* Issue #560: Semantic difference between UninstallCondition and IsUninstalling
* Issue #564: Correct variable name of SequentialGuid initialization.
* Issue #562: Typo in Compiler.cs comments
* Issue #561: Typo in WixProject.cs
* Added missing namespace in custom dialog template, fixed comment.
* Added explicit `WixEntity.ComponentId` property
* Issue #551: Cannot include extra .wxs as part of a bundle
* Issue #542: ServiceInstaller.StartOn/StopOn/RemoveOn - Documentation bug
* Issue #544: Failed while processing WebSites; added support for `IISVirtualDir.AttributesDefinition`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants