Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
IIS7: A brief tour
Diagnostics drilldown
Best practices and patterns
Opt-in modular architecture with new
1.
     extensibility model
     Reliable, high performance PHP hosting
2.
     along...
Publishing
                                      Application                    Health and                    FTPServer
  ...
Componentized
                                                                          server
                           ...
Windows Server hosting for PHP or any other FastCGI-
compliance framework along with ASP.NET
Built-in FastCGI optimized fo...
Powerful, XML-file based Management
   Easily copy configuration from server to server
   Use environment variables to abs...
New .NET API:
Microsoft.Web.Administration
  Remoteable through COM interface
  PowerShell support
Delegate Management to ...
Modularity | Configuration | PHP
Hosting | Xcopy Deployment for an
ASP.NET application
Tools                                 Event Monitor
             Browser

                    AppCmd Command-Line
        ...
Production Bug
   Development           Functional testing
                                                     Fixing
• D...
Don’t assume something is happening.
Do get facts.
 Performance counters, event counters,
 FREB logs, RSCA
Don’t go down t...
Detailed error messages
1.
     Failed Request Tracing
2.
     Tracing integration
3.
Uniquely identify most IIS 7.0 web server and
module error conditions
   Unique response status / sub-status codes
   Logg...
Error    Cause                                           Resolution
500.19   Wrong configuration section syntax           ...
Enable no-repro instrumentation for failed
requests
Allow for custom failure definitions per URL
   Time taken, status/sub...
ASP.NET page traces for integration into
Failed Request Trace logging
System.Diagnostics.Trace
  Capture tracing informati...
Process orphaning for failed applications through
Advanced Settings on app pools (or
orphanActionExe in config)
Rapid Fail...
Use request log files to find error
patterns and offending URLS
Consider using process orphaning
Use ASP.NET health monito...
Enable Output Caching for semi-dynamic pages
Set IIS worker processes in Wow64 mode in per-
AppPool settings
If you * scri...
Use Failed Request Tracing to capture
hard-to-repro errors
Set fine-grained Failed Request
Tracing rules to keep your log ...
Web-based release channel
   Free for download, www.iis.net
Agile release model
   Q1 2008: Secure FTP server, WebDav,
   ...
Home for the IIS Technical Community!
 In-depth technical articles and samples

 Connect with other IIS experts on blogs &...
New IIS7 platform
    Modular architecture
    First class PHP support
    XML based configuration
    Remote mgmt
    Dia...
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be...
Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7
Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7
Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7
Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7
Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7
Upcoming SlideShare
Loading in …5
×

Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7

2,685 views

Published on

Learn how to rapidly debug and fix the popular application frameworks (ASP.NET, classic ASP and PHP) on Microsoft Internet Information Services 7. This session covers the basics of health monitoring and some tips and tricks that developers need to know to resolve their issues faster

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Everything You Need to Know about Diagnostics and Debugging on Microsoft Internet Information Services 7

  1. 1. IIS7: A brief tour Diagnostics drilldown Best practices and patterns
  2. 2. Opt-in modular architecture with new 1. extensibility model Reliable, high performance PHP hosting 2. alongside ASP.NET hosting Easy-to-use XML-based configuration 3. system Powerful secure remote, delegated 4. administration Diagnostic tools for troubleshooting 5.
  3. 3. Publishing Application Health and FTPServer Security Development Diagnostics FTP Management WebDavModule AnonymousAuthentication .NET Extensibility Performance HttpLogging BasicAuthentication ISAPIFilter DigestAuthentication StaticCompression CustomLogging ISAPIExtension WindowsAuthentication DynamicCompression CGI RequestMonitor UrlAuthorization FastCGI CertificateMapping HttpTracing ServerSideIncludes ADCertificateMapping Management ODBCLogging ASP RequestFiltering Management Console LoggingLibraries ASP.Net IPRestriction Management Scripting Core HTTP Server Components Mgmt Service (WMSVC) IIS6 Config (Metabase) DirBrowsing HttpRedirect DefaultDoc CustomErrors StaticFile IIS6 WMI Provider Process Model (Windows Process Activation Service) IIS6Scripting ProcessModel .Net Environment Configuration API IIS6 Management Snap-in
  4. 4. Componentized server Basic 40+ Pluggable HTTP HTTP HTTP HTTP Request Response Request Response modular Authentication functionality ... Authentication Small generic Determine NTLM Basic Anon request pipeline Handler Url Authorization Authz ... Enables ResolveCache Output SendResponse Cache ... CGI Lightweight servers Static ExecuteHandler File Custom / Forward specialized ISAPI er ... servers Integrated mode UpdateCache ASP.NET SendResponse Compre Log ssion membership, forms authentication, and Login controls
  5. 5. Windows Server hosting for PHP or any other FastCGI- compliance framework along with ASP.NET Built-in FastCGI optimized for high performance and reliability for non-thread safe PHP proceses Reuses CGI processes for multiple requests 25x faster than standard CGI Fully tested against latest PHP.NET builds (PHP 5.2.1) Plugs into IIS diagnostics before the requests enters and once the request leaves the PHP engine Host Multiple Versions of PHP Side by Side Easily host PHP4 and PHP5 on the same server
  6. 6. Powerful, XML-file based Management Easily copy configuration from server to server Use environment variables to abstract physical paths Enable Farms of Stateless Front-End Web Servers Share IIS configuration on central UNC share Quickly XCopy deploy apps Distributed Web.config files (IIS and ASP.NET config) live with content Can be local or remote UNC path Separate, scoped config file for each AppPool built-in Process isolation for each new site by default
  7. 7. New .NET API: Microsoft.Web.Administration Remoteable through COM interface PowerShell support Delegate Management to Site Owners Manage with Remote Administration Tool Supports Vista, Windows 2003, XP Secure, firewall-friendly connection over HTTP/SSL Authenticates both Windows and non-Windows credentials
  8. 8. Modularity | Configuration | PHP Hosting | Xcopy Deployment for an ASP.NET application
  9. 9. Tools Event Monitor Browser AppCmd Command-Line Logs IIS7 Manager utility Platform Performance Detailed RSCA ETW Tracing Counters Errors ASP.NET Failed Process Trace Request Orphaning integration Tracing
  10. 10. Production Bug Development Functional testing Fixing • Detailed errors • Detailed errors • Runtime State and • Failed request • Failed request Controls API (RSCA) tracing tracing • Event Tracing for • ASP.NET integrated • Performance Windows (ETW) tracing monitors tracing • Web Capacity • Failed request Analysis Tool tracing (WCAT) for stress • Performance testing • Orphan failed counters • DebugDiag processes for • Orphan failed debugging processes for debugging
  11. 11. Don’t assume something is happening. Do get facts. Performance counters, event counters, FREB logs, RSCA Don’t go down the “switch this setting and see”. Do find the root cause, and then resolve the problem there. FREB, detailed errors, RSCA Do isolate the problem. FREB, detailed errors, trace events
  12. 12. Detailed error messages 1. Failed Request Tracing 2. Tracing integration 3.
  13. 13. Uniquely identify most IIS 7.0 web server and module error conditions Unique response status / sub-status codes Logged in site logs and shown in detailed error Provide rich information to understand and resolve the error Module, pipeline stage, win32 error code, etc. Lists possible causes, and things you can try Provides error message security By default, detailed errors sent only to localhost Can configure to send to all clients Can configure custom errors from file, URL, or redirect ASP.NET custom errors override IIS custom errors
  14. 14. Error Cause Resolution 500.19 Wrong configuration section syntax Config File shows the file and line (elements, attributes, attribute value type) of the error in configuration file. You are requesting a script that doesn’t 404.3 Install the corresponding have the associated application framework framework to resolve this. installed. OR OR You are requesting a static file which is not Add the extension to the MIME registered as a static file. Types in IIS Manager 404.1 This error occurs whenever no suitable For anonymous web sites, enable authentication method is configured (your anonymous authentication. site does not enable any authentication OR methods or the browser does not support Enable other authentication the authentication methods you have methods that your client supports. configured).
  15. 15. Enable no-repro instrumentation for failed requests Allow for custom failure definitions per URL Time taken, status/substatus codes Enable per-URL trace configuration Allow me to define what to trace per URL Persist failure log files beyond process lifetime Common scenarios: Request takes too long/hangs -> very common today Request error -> request completes, but with error status code Authentication/Authorization problems Server 500 errors
  16. 16. ASP.NET page traces for integration into Failed Request Trace logging System.Diagnostics.Trace Capture tracing information from .NET components Configure trace sources to control specific application tracing information ASP.NET Health Monitoring events Correlate and analyze application tracing information in the context of the overall request
  17. 17. Process orphaning for failed applications through Advanced Settings on app pools (or orphanActionExe in config) Rapid Fail Protection (RFP) occurs when app pool fails X times in Y minutes (configurable) ETW tracing for Windows for extensive logging RSCA lets you view requests that are in-flight DebugDiag for performance related issues including high and low CPU Hangs (slow response), process termination, memory leaks
  18. 18. Use request log files to find error patterns and offending URLS Consider using process orphaning Use ASP.NET health monitoring to receive configurable alerts about errors Use WCAT to stress application before product Use design patterns in the Performance Tuning whitepaper (add link)
  19. 19. Enable Output Caching for semi-dynamic pages Set IIS worker processes in Wow64 mode in per- AppPool settings If you * script-mapped all requests to ASP.NET in IIS6, Integrated Pipeline is much faster than an IIS6 * scriptmap solution. Try together with IIS7 URL Authorization. Put your high traffic document on top of the Default Documents list. Static default documents are cached in kernel-mode
  20. 20. Use Failed Request Tracing to capture hard-to-repro errors Set fine-grained Failed Request Tracing rules to keep your log history valid Don’t use IISReset, recycle apppools Check key performance counters for clues on application health Example: GC-related performance counters
  21. 21. Web-based release channel Free for download, www.iis.net Agile release model Q1 2008: Secure FTP server, WebDav, Remote Manager for IIS7, Media Pack (Bit Rate Throttling) Built using the new IIS7 extensibility platform After setup, fully integrated into IIS admin Fully serviced and supported on Windows Server 2008
  22. 22. Home for the IIS Technical Community! In-depth technical articles and samples Connect with other IIS experts on blogs & forums Free advice and assistance in forums Download center with IIS extensions
  23. 23. New IIS7 platform Modular architecture First class PHP support XML based configuration Remote mgmt Diagnostic toolset Diagnostic tools suited to initial development or troubleshooting Wide set of tools for troubleshooting and diagnostics. Narrow down root cause with Detailed Errors and Failed Request Tracing Any questions or comments? Contact: mailant@microsoft.com
  24. 24. © 2008 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.

×