Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Windows 7 SP1 causes IntelliTrace Collection to fail on IIS


Symptoms

When attempting to view IntelliTrace call information for a web application running on Windows 7 SP1 IIS you receive the following message in the Visual Studio IntelliTrace window.

IntelliTrace is not collecting data for this debugging session.

The project type may not be supported or the process you are debugging may have been either attached to or launched with IntelliTrace disabled. Restarting the debugging session within Visual Studio may solve this. Please note that IntelliTrace is not supported when attaching to a process that is already running.

If you have selected a custom location for IntelliTrace recordings, please make sure it is writable by the process being debugged.

Note that this resolution is specific to the changes made to IIS with Windows 7 SP1 and is not related to any other configuration or permissions problems as mentioned in the actual error message.

↑ Back to the top


Cause

Windows 7 SP1 introduced a new default setting for IIS that prevents the loading of profile specific environment variables for IIS application pools. These environment variables are required for IntelliTrace to function correctly when collecting event and call information.

↑ Back to the top


Resolution

Modify the applicationHost.config file to enable loading of the environment variables for the application pool that hosts the web site using the following steps.

Edit the applicationHost.config file found in %windir%\system32\inetsrv\config\. Add a <processModel> element to the application pool definition that you want to enable IntelliTrace event and call information collection. Configure the setProfileEnvironment attribute to "true". The applicationPools element is found under <configuration><system.applicationHost> in the file. Refer to the sample below for changes to the <applicationPools> section to enable IntelliTrace.

Before:

<applicationPools>
   <add name="DefaultAppPool" />
   <add name="Classic .NET AppPool" managedPipelineMode="Classic" />
   <add name="ASP.NET v4.0" managedRuntimeVersion="v4.0" />
   <add name="ASP.NET v4.0 Classic" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" />
   <applicationPoolDefaults>
                <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="false" />
    </applicationPoolDefaults>
</applicationPools>

After (modified elements in bold):

<applicationPools>
   <add name="DefaultAppPool" />
   <add name="Classic .NET AppPool" managedPipelineMode="Classic" />
<add name="ASP.NET v4.0" managedRuntimeVersion="v4.0">
      <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="true" />
   </add>
   <add name="ASP.NET v4.0 Classic" managedRuntimeVersion="v4.0" managedPipelineMode="Classic" />
   <applicationPoolDefaults>
                <processModel identityType="ApplicationPoolIdentity" loadUserProfile="true" setProfileEnvironment="false" />
    </applicationPoolDefaults>
</applicationPools>


The above sample will enable IntelliTrace event and call information collection for web sites that are configured to use the "ASP.NET v4.0" application pool.

↑ Back to the top


More Information

The setProfileEnvironment attribute was introduced in SP1 to support certain scenarios in which loading profile based environment variables would conflict with the expected values. Note that configuring the application pool as above may cause some web applications that use that application pool to behave either incorrectly or display unexpected behavior. In particular setting the setProfileEnvironment attribute to "true" has been shown to cause problems when running ASP classic web applications that rely on an Access database.

↑ Back to the top


Keywords: kb

↑ Back to the top

Article Info
Article ID : 2547655
Revision : 1
Created on : 1/7/2017
Published on : 5/17/2011
Exists online : False
Views : 733