Http Client Protocol Issues

If you use any of these solutions, Please let me know so I can track if any of this is useful to you! Thanks! This is an area to share observations I have made working with Http Client Protocols and the associated technologies. I currently work for the Microsoft team that supports the WinInet, WinHTTP and System.Net API's and classes associated with these technologies. This is not a replacement for Microsoft Support, but an area to discuss these technologies. These postings are provided "AS IS" with no warranties, and confer no rights. Use of included code samples are subject to the terms specified at Microsoft - Information on Terms of Use

How to get a dump for a System.Net.WebException using DebugDiag (Debug Diagnostics)

This information is available in the help file as well.  For more options please refer to the Help Documentation include with DebugDiag.

Install the latest Debug Diagnostics from http://download.microsoft.com (search for Debug Diagnostics once on that site)

Configure a crash rule for all w3wp.exe processes (if this dialog does not appear simply press the ‘Add Rule…’ button).

image

Select ‘A specific process’

 image

Make sure you DO NOT check ‘This process instance only’ and type in the process we wish to monitor (in this case asp.net is running in w3wp.exe).

image

In the ‘Advanced Configuration Dialog’ select the 'Exceptions...’ button at the bottom of this dialog:

image

Choose ‘Add Exception…’.  Clicking this button will bring up the Configure Exception dialog.  Use this to configure actions for a specific type of first chance exception.

image

In the Configure Exception Dialog, Choose 'CLR (.NET) Exception'

image

For the 'Net Exception Type' field: (This will only be available when choosing the E0434F4D CLR (.NET) Exception code)   You must specify the exact name of the exception in this field.  This field is case sensitive.  In our case we want System.Net.WebException

image

In the ‘Action Type’ pull down specify ‘Full User Dump’ and you will be able to capture the state when we have the 401 (or other) WebException in the w3wp.exe process.

image

The ‘Action Limit’ by default is set to 1.  This means only one dump will be created.  If you wish to catch more than one dump, increase this number (usually 3 is sufficient).  Then hit OK and proceed by hitting the ‘Save & Close’ button (note you will see the configured CLR exception now).

image

Finally hit the ‘Next >’ button twice and then ‘Finish’.  The rule will be activated.

You do not need to keep the UI up for DebugDiag.  If you do keep it up you will see the ‘Userdump Count’ increase with each exception you encounter (up to the limit you set previously) and the location of the dump is listed as well.

image

Finally to analyze the dump, you can use DebugDiag to analyze the script.  You can use the special script I developed here to get a good picture of what the problem may be.

Please drop me a note and let me know if this Post helped you!

Published Tuesday, September 29, 2009 10:13 AM by jpsanders

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker