this is the main tracing and diagnostics presentation. very important that this be practical and...
TRANSCRIPT
Troubleshooting Overview Reset and Recycle
IIS ResetApplication Pool Management
Error CodesNew HTTP Sub-status codesCustom/Detailed Errors
Tracing in IIS7 and LonghornETW tracingIIS7 Tracing
Common Problems and solutions
Application Pool ManagementEasier to manage pools with IIS Manger
Manage long lists of poolsDisplays Identity, Framework Version, TypeWorker Process information avail in UI
Recycle AppPools using:Command Line:
appcmd recycle appool “DefaultAppPool”IIS Manager: AppPools RecycleMicrosoft.web.adminsitration API
See currently running requests:appcmd list requestsUI: Worker Process View Current Requests
Unload App Domain now possible
Rapid Fail Protection Actions
RFP occurs when pool fails X times in Y minutes (configurable)Prevents continuous attempts to start a very ill processProcess will eventually recycle after Y minutesIIS 7 allows a configurable action to occur when RFP kicks in
See Application Pool, Advanced Settings
New HTTP Sub-status codes
New sub-status codes addedProvides more detail to help quickly identify problems
Recorded in IIS logsCombined with detailed errors to give actionable error messages
Examples:404.5 404.15: Denied by Request Filtering (URLScan replacement)500.21 500.24: ASP.NET integrated pipeline
Detailed Errors
New Verbose errors provides much more information Provided by CustomErrors IIS7 moduleSuggests Causes and Solutions – often suggests corrective action or lines of inquiryDetails include configuration section in question, module in use, page, etc.Verbose errors only delivered to localhost by default
Custom ErrorsErrors can be customized similar to IIS6Options are:
File: Show a specific fileExecuteRequest : url to a page or program in the same application pool. (url-rewrite, does not involve round trip)
New to IIS 7Redirect : Redirect to a new url (like a URL redirection, with client roundtrip)Replace=All (setting is not in UI)
In some cases, a crash or error may not “bubble up” to IIS7 custom error module.This switch ensures IIS7 errors are used
Custom Error ConsidertaionsDelegation for custom error
configuration is off by defaultPrevents web.config rule to display files on the server when error occurs
If you own ALL responses (Replace=All), must handle all scenarios (eg. SOAP 500)In Classic mode, ASP.NET errors are overridden by IIS7 custom errors
Error handling differences in classic vs integrated mode
Event Tracing for Windows(ETW)
Built into the OSPresent on Windows Server 2003Significantly extended in LonghornETW providers report into a binary log No UI for configurationLogs can be very large and must be parsed by utility
TIP: Logparser is your friendLack of ability to setup “triggers”
IIS7 Failed Request Tracingaka FREB (failed request event buffering)
Enable no-repro instrumentation for “failed requests”
Turn tracing on, but only keep the events for “failed requests”
Allow for custom failure definitions per URLTime takenStatus/substatus codes
Enable per-URL trace configurationAllow me to define what to trace per URLExample: only trace aspnet events for “*.aspx”
Persist failure log files beyond process lifetimeCommon scenarios:
Request takes too long/hangs -> very common todayRequest error -> request completes, but with error status code
Authentication/Authorization problemsServer 500 errors
Viewing Trace Data
ETW (IIS 6)Trace Data is useful, but difficult to use. Requires utilities to extract and present events from file.IIS 7 provides preformatted XSLT for easy analysis of capture
In Vista RTM
IIS 7 Failed Request Events Logs
IIS7 Tracing
• Identifying cause of a slow response
• Determining why a page isn’t cached
#5 of 5
demo
Tracing
Other Tracing SettingsMost are not in UI, but can be set in configLog directory
maxLogFiles (in UI)maxLogFileSizeKB
Run a command when a rule fires:customActionsEnabledcustomActionExecustomActionParamscustomActionTriggerLimit
Extensibility PointsCreate your own errors pagesReplace IIS7 error handling moduleApplications can write events to the IIS 7 tracing systemTrigger specific actions when rapid fail protection occursCustom actions can be configure on specific errorsASP.net pages and WCF can report trace events into trace logs
IIS 7 RxASP.net application doesn’t’ work in integrated mode:
Some settings in web.config may need to be repositioned. Appcmd Migrate will do this automaticallyUse Classic mode
IIS 6 installation scripts don’t workInstall IIS Management Compatibility Layer
Where do I set Read/Execute permissions for a site?
Moved to handler permissionsWhy doesn’t ASP.net run?
Is it installed? Most questions of this sort are caused by the reduce footprint installation
Summary
IIS Manager improves management and better visibility of runtime environmentError messages are actionableCommand line interfaces and APIs for state query, control, and diagnosticsBuilt in tracing helps identify many problems without specialized debuggersExtensibility allows new and customized options
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date
of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.