Binding Diagnostics for IIS/IIS Express#

By Lex Li

This page shows you how to use Binding Diagnostics.

Background#

IIS sites use bindings to determine what kind of incoming HTTP requests they would handle.

For example, assume that there is only a default web site right now on IIS with the following settings,

<sites>
  <site name="first" id="8">
    <bindings>
      <binding bindingInformation="*:80:" protocol="http" />
    </bindings>
    <application path="/">
      <virtualDirectory path="/" physicalPath="e:\test1" />
    </application>
  </site>
</sites>

The binding setting above ensures that all HTTP requests arriving at any of the network adapters of this machine are sent to this web site by HTTP.sys.

And if we add a second site,

<sites>
  <site name="first" id="8">
    <bindings>
      <binding bindingInformation="*:80:" protocol="http" />
    </bindings>
    <application path="/">
      <virtualDirectory path="/" physicalPath="e:\test1" />
    </application>
  </site>
  <site name="second" id="8">
    <bindings>
      <binding bindingInformation="*:80:lextudio.com" protocol="http" />
    </bindings>
    <application path="/">
      <virtualDirectory path="/" physicalPath="e:\test2" />
    </application>
  </site>
</sites>

Then HTTP.sys forwards all HTTP requests with host header of “lextudio.com” to the second site, while all other HTTP requests still go to the first site.

Important

To learn more about HTTPS bindings, check HTTP API Page.

Important

If the site binding contains an IP address, make sure that IP address belongs to one of the network adapters of this machine. Using an invalid IP address only leads to an invalid binding.

Warning

Certain HTTP API settings such as Reserved URLs can have conflicts with site bindings. Check HTTP API Page.

Warning

Excluded port ranges can also have conflicts with site bindings. Check this KB article .

Note

More information about site bindings can be found in this article.

It requires experience to fully understand the concepts of site bindings and how the HTTP request forwarding works especially when there are multiple sites on the same machine. Without learning HTTP protocol itself and how web browser/IIS work together, mistakes can be made easily.

That’s why Jexus Manager includes a specific diagnostics tool in this area.

The Built-in Binding Diagnostics#

For a web site is opened in Jexus Manager, there is now a Binding Diagnostics menu item showing in the Actions panel under Troubleshooting section,

../_images/bindings.png

Click this menu item and the Binding Diagnostics dialog shows. A report is generated when “Generate Report” button is clicked.

../_images/binding_diag.png