title | author | description | ms.date | ms.assetid | msc.legacyurl | msc.type |
---|---|---|---|---|---|---|
Areas <areas> |
rick-anderson |
Overview The <areas> collection specifies a list of functional areas for a provider to trace. Compatibility Version Notes IIS 10.0 The <areas> el... |
09/26/2016 |
015c36de-e927-43a2-ac68-9b7a82517ce8 |
/configreference/system.webserver/tracing/traceproviderdefinitions/add/areas |
config |
The <areas>
collection specifies a list of functional areas for a provider to trace.
Version | Notes |
---|---|
IIS 10.0 | The <areas> element was not modified in IIS 10.0. |
IIS 8.5 | The <areas> element was not modified in IIS 8.5. |
IIS 8.0 | The <areas> element was not modified in IIS 8.0. |
IIS 7.5 | The <areas> element was not modified in IIS 7.5. |
IIS 7.0 | The <areas> element of the <traceProviderDefinitions> collection was introduced in IIS 7.0. |
IIS 6.0 | N/A |
After you finish the default installation of IIS 7 and later, you must install the tracing role service to use failed request tracing. After you install the role service, you still must enable failed request tracing at the site level, application level, or directory level.
- On the taskbar, click Server Manager.
- In Server Manager, click the Manage menu, and then click Add Roles and Features.
- In the Add Roles and Features wizard, click Next. Select the installation type and click Next. Select the destination server and click Next.
- On the Server Roles page, expand Web Server (IIS), expand Web Server, expand Health and Diagnostics, and then select Tracing. Click Next.
. - On the Select features page, click Next.
- On the Confirm installation selections page, click Install.
- On the Results page, click Close.
- On the Start screen, move the pointer all the way to the lower left corner, right-click the Start button, and then click Control Panel.
- In Control Panel, click Programs and Features, and then click Turn Windows features on or off.
- Expand Internet Information Services, expand World Wide Web Services, expand Health and Diagnostics, and then select Tracing.
- Click OK. - Click Close.
- On the taskbar, click Start, point to Administrative Tools, and then click Server Manager.
- In the Server Manager hierarchy pane, expand Roles, and then click Web Server (IIS).
- In the Web Server (IIS) pane, scroll to the Role Services section, and then click Add Role Services.
- On the Select Role Services page of the Add Role Services Wizard, select Tracing, and then click Next.
- On the Confirm Installation Selections page, click Install.
- On the Results page, click Close.
- On the taskbar, click Start, and then click Control Panel.
- In Control Panel, click Programs and Features, and then click Turn Windows Features on or off.
- Expand Internet Information Services, then World Wide Web Services, then Health and Diagnostics.
- Select Tracing, and then click OK.
There is no user interface for adding trace providers for IIS 7. For examples of how to add trace providers programmatically, see the Code Samples section of this document.
None
Element | Description |
---|---|
add |
Optional element. Adds a functional area to the collection of functional areas to trace. |
clear |
Optional element. Removes all references to functional areas from the functional areas to trace collection. |
remove |
Optional element. Removes a reference to a functional area from the functional areas to trace collection. |
The following default <traceProviderDefinitions>
element is configured in the root ApplicationHost.config file in IIS 7.0.
[!code-xmlMain]
The following examples add a custom trace provider with two trace areas to the list that is defined in the global <traceProviderDefinitions>
collection.
[!code-consoleMain]
Note
You must be sure to set the commit parameter to apphost
when you use AppCmd.exe to configure these settings. This commits the configuration settings to the appropriate location section in the ApplicationHost.config file.
[!code-csharpMain]
[!code-vbMain]
[!code-javascriptMain]
[!code-vbMain]