ANTS Profiler

Latest version: 4.3

ANTS Profiler

Knowledge Base

IIS web application always loads default website

Category: Troubleshooting & error messages
Date: 06 Jan 2011
Product: ANTS Profiler
Platforms: Web application hosted in IIS 6,7

When profiling a web application on an installation of IIS that hosts more than one website, ANTS Profiler may consistently load the default website regardless of the website chosen for performance or memory profiling. This may happen if multiple websites are configured to use the same TCP port, but different host headers.

The problem is caused by a bug in ANTS Profiler that only compares the host component of the website's bindings in lower case. Therefore, if you have two websites, and the second answers to the same IP address and ports as the default, but only when the host header "Site2" is used, for instance, ANTS Profiler will load the default website. You can check this by changing the path component of the URL in the web browser to one that is known to exist on the default website.

To solve the problem, launch the IIS Manager to edit the bindings for the second website. In the section for "host header", change the entry to one that is all lower-case.

ANTS Profiler starts an IIS worker process outside of IIS on its' own TCP port (8013, by default). Part of the process of loading the web application into ANTS Profiler's worker process is to query the IIS metabase for configuration information. This configuration depends on resolving the URL typed into ANTS Profiler's URL textbox to the binding information in the IIS metabase (or applicationHost.config, in the case of IIS 7). If this process fails, then ANTS Profiler may load the default website into the profiling session, resulting in an HTTP 403 or 404 error in the web browser when an identical web application does not exist on the default website.

Alternatively,
1) Apply only single binding to site. That means: create site and create one binding to that site. As only the binding is acceptable by IIS, the profiler works fine as well.
2) You can apply multiple bindings to the same site, but they have to be recognized on something other than only host names (e.g. IP address).
For example
Binding 1:
"IP address: All Unassigned ", "Port: 80" and "Host Name:
myhost1.company.com"

Binding 2:
"IP address: All Unassigned ", "Port: 80" and "Host Name:
myhost2.company.com"

Binding 3:
"IP address: All Unassigned ", "Port: 80" and "Host Name:
myhost3.company.com"

This configuration is acceptable for IIS and you can browse the pages with IE browser, but it is not acceptable by the ANTS Performance Profiler and as a raises the error "Could not determine IIS site..."
You can change it to this one
Binding 1:
"IP address: 192.96.123.11 ", "Port: 80" and "Host Name:
myhost1.company.com"

Binding 2:
"IP address: 192.96.123.12 ", "Port: 80" and "Host Name:
myhost2.company.com"

Binding 3:
"IP address: 192.96.123.13 ", "Port: 80" and "Host Name:
myhost3.company.com"

(You have to manually configure the addresses that are normally resolved by DNS).

Document ID: KB200801000221 Keywords: ANTS,Profiler,IIS,binding,Ambiguous_site_selection

Was this article helpful?

Search support
Forums
Visit the ANTS Profiler forum.

ANTS Profiler

all products