Page 1 of 1

HOWTO detect the binding URL in IIS7 using InstallAware

Posted: Thu Dec 04, 2008 10:16 pm
by Dana Epp
In IIS7, its "bindings" bubble up what the URL will end up being. As an example, someone could create a binding that would look like this in the applicationHost.config:

Code: Select all

<bindings>
   <binding protocol="Http" bindingInformation="*:80:fubar" />
   <binding protocol="Https" bindingInformation="*:443:" />
</bindings>
This would mean a webap installed in this website would point to:

http://fubar/SomeWebApp

Is there a way to do get the binding name in InstallAware for the target website? Basically I want to find the URL so I can create a proper link to our webapp on the Start menu, no matter what website it's installed into. In the past I used to just point it to localhost, but this is no longer guaranteed to be valid in IIS7.

How are other people doing this? There must be some way to read the binding through InstallAware.

Posted: Thu Dec 04, 2008 10:25 pm
by Dana Epp
Sorry, to add to this... I guess what I am REALLY after is what the hostheader is.... ie: What URL should I be placing in the link.