Binding Diagnostics for IIS/IIS Express

By Lex Li

This page shows you how to use Binding Diagnostics.

In this article:

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.

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