Troubleshooting IIS profiling
Published 03 December 2012
When you click Start Profiling for an ASP.NET web application (IIS), profiling may not start, and a "Cannot start IIS" error may be displayed. This indicates one or more of the following:
- The logged-in user has insufficient account permissions to run the web application.
- Internet Explorer is running in protected mode.
- IIS is unable to resolve the web application's URL.
- ANTS Performance Profiler encounters a conflict with another performance profiler installed on your computer.
This page describes how to resolve these issues.
The logged-in user has insufficient account permissions to run the web application
ANTS Performance Profiler starts the IIS application pool with permissions inherited from the currently logged-in user account, rather than using the IIS application settings.
- If possible, run ANTS Performance Profiler as an administrator.
- If you are unable to run ANTS Performance Profiler as an administrator, grant the logged-in user account permissions to access the IIS configuration system and write to the ASP.NET temporary files. For more information on how to do this, see Assign ASP.NET Permissions to the New Account (MSDN).
Manually specifying the ASP.NET account
The error may also occur when using "Manually specify ASP.NET account details". Check that the specified account is a valid user, has administrator privileges, and has read access to %ProgramFiles%\Red Gate\ANTS Performance Profiler 7\ProfilerCore.dll.
Internet Explorer is running in protected mode
If Protected Mode is turned on in Internet Explorer, when you click Start Profiling, a browser session may invisibly start and quickly terminate. If this occurs, Internet Explorer may launch with the message "Internet Explorer cannot display the webpage" or "Could not connect to the remote server", and no profiling results are displayed.
To prevent this error:
- If possible, turn off Protected Mode in Internet Explorer before starting a profiling session.
- If you need to use Protected Mode, add localhost to the list of trusted sites, and try to profile your application again. For instructions on adding a site to Internet Explorer's Trusted Sites list, see Security zones: adding or removing websites (Microsoft documentation).
IIS cannot resolve the web application's URL
If the bindings in IIS have been changed from the default, ANTS Performance Profiler may be unable to resolve your site's hostname. If this problem occurs, the following error message is usually shown:
"Couldn't determine the IIS Site associated with URL 'http://< URL>:port'. Please check that the URL is serviced by the instance of IIS running on this machine."
In the ASP.NET web application (URL) field, enter localhost or the loopback IP address (127.0.0.1) and try to profile your application again:
ANTS Performance Profiler encounters a conflict with another performance profiler installed on your computer
IIS can fail to start if ANTS Performance Profiler encounters a conflict with another performance profiler. We recommend uninstalling other profilers while profiling with ANTS Performance Profiler.
If you had ANTS Performance Profiler version 7.0 and installed the early access build of the continuous profiling tool, an IIS module installed by the continuous profiler may be preventing profiling. To re-enable other profilers with IIS, uninstall the IIS Profiler Module:
- From your computer's Start menu, launch the Continuous Profiling Configuration Tool.
- Click Uninstall.
For more information on configuring continuous profiling, see Setting up continuous profiling.
If you are running ANTS Performance Profiler Version 5.2 and earlier:
If the error persists after uninstalling other profilers, you may need to remove environment variables left behind by an earlier profiling session:
- Close ANTS Performance Profiler and IIS.
- In regedit.exe, locate the following registry key:
If you are running IIS version 6.0 or earlier: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IISADMIN
If you are running IIS version 7.0 or later: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC - Expand the key and modify the Environment subkey to delete the following values:
COR_ENABLE_PROFILING=1 and COR_PROFILER={a GUID}.
Note: if the Environment subkey does not exist, please contact Red Gate support (see below for more details). - Close the Registry Editor, restart ANTS Performance Profiler, and try to profile your application again.
Contacting Red Gate support
If you are unable to resolve this problem using the information in this topic, please contact support, and supply as much information, including:
- the versions of IIS and ANTS Performance Profiler you are using
- your computer's operating system
- the steps you have already tried
- any error messages ANTS Performance Profiler has generated, including any in the log files. More information about locating log files for ANTS Performance Profiler can be found here.