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

IIS-Extension could not locate the website #5960

Open
hypetsch opened this issue Feb 26, 2019 · 5 comments
Open

IIS-Extension could not locate the website #5960

hypetsch opened this issue Feb 26, 2019 · 5 comments

Comments

@hypetsch
Copy link

  • Which version of WiX are you building with?

3.14.0.1703

  • Which version of Visual Studio are you building with (if any)?

2017

  • Describe the behavior you expected and how it differed from the actual behavior.

We are just trying to understand/solve an issue with our companies installer. As the mailing list could not help we are trying it this way, and appreciate any information.

We are using the IIS Extension to locate the "Default Web Site" like this:

<iis:WebSite Id="DefaultWebSite" Description='Default Web Site' Directory='INSTALLDIR'>
   <iis:WebAddress Id="AllUnassigned" Port="80" />
</iis:WebSite>

Now we had the issue at a customer that locating the website failed causing the installer to rollback with:

WriteIIS7ConfigChanges: Error 0x80070002: Site not found for create application
WriteIIS7ConfigChanges: Error 0x80070002: Failed to configure IIS application.
WriteIIS7ConfigChanges: Error 0x80070002: WriteIIS7ConfigChanges Failed.

The name of the default web site on the customers PC was "Default Website" having three http bindings for port 80 and IP Address set to *. All of the bindings had a value configured in their "Host Name" setting.
image

Adding another binding with an empty hostname solved the issue but in my understanding it should have found the website regardless whether the there is a binding with an empty host name or not? Are we missing something?
image

During some tests in our lab we found out that finding the website works even if it cannot be found via the binding (like at the customer) - as long as the name equals the configured Description "Default Web Site". So there seems to be a fallback to the iis:WebSite[@description] attribute which I did not find in the docu (Maybe this should be added?).

Are we using it the wrong way or is this maybe a bug in the IISExtension (not finding the website when there is no binding with an empty "Host Name") or just not possible this way?

Btw.: specifying IP="*" in iis:WebAddress does not help.

@BMurri
Copy link

BMurri commented Feb 26, 2019

My understanding is that the code you supplied is looking for a website that is on port 80 and doesn't have a specific host/ip attached (which is why adding a record with no host name worked). If you had added one of the host names to your authoring my understanding is that it would have found the site.

How long did you have this on the wix-users list with no answers? I'm not on there every day, and I'm no expert on the IIS extensión, but I don't recall seeing it.

@hypetsch
Copy link
Author

Thanks for the fast response. In my understanding adding the customer specific host name is not a solution as the installer is of course used by multiple customers.

I thought at least the following code should find the website independent from the host name setting (adding Ip="*"):

<iis:WebSite Id="DefaultWebSite" Description='Default Web Site' Directory='INSTALLDIR'>
   <iis:WebAddress Id="AllUnassigned" Port="80" Ip="*" />
</iis:WebSite>

As far as I understand it, there is otherwise no way to make it working/locate the website? (Taken that there is a binding on port 80 as a prerequisite for the installation)

btw: Wrote to the mailing list about a week ago: http://lists.wixtoolset.org/pipermail/wix-users-wixtoolset.org/2019-February/007823.html

@barnson
Copy link
Member

barnson commented Feb 28, 2019

Adding to v4.x for doc impact of searching by description. Otherwise, this is how WixIIsExtension works.

@hypetsch
Copy link
Author

hypetsch commented Mar 1, 2019

Ok, thanks for the information although I am sorry to hear that there is no way to find a website solely by the port of the binding when there is an (unknown) host name set.

@robmen
Copy link
Member

robmen commented Mar 1, 2019

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

4 participants