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

My Favorite System.Net trace configuration file dumps Process ID and Date Time Information

Often you need to correlate a .NET trace with a Netmon trace.  To do that you need the date and time of the call from the System.Net trace.  This will do it!

NOTE:  This section is configures where the log file is and where it should be written: initializeData="System.Net.trace.log"
Specify the path and file name and make sure the process running has permissions to write that file in the location you specify!

 

Copy Code:

 <configuration>
    <system.diagnostics>
        <trace autoflush="true" />
                <sources>
                <source name="System.Net">
                        <listeners>
                <add name="System.Net"/>
                        </listeners>
                </source>
                <source name="System.Net.HttpListener">
                        <listeners>
                <add name="System.Net"/>
                        </listeners>
                </source>
        <source name="System.Net.Sockets">
                        <listeners>
                <add name="System.Net"/>
                        </listeners>
                </source>
        <source name="System.Net.Cache">
                        <listeners>
                <add name="System.Net"/>
                        </listeners>
                </source>
                </sources>
        <sharedListeners>
                <add
                 name="System.Net"
                 type="System.Diagnostics.TextWriterTraceListener"
                  initializeData="System.Net.trace.log"
                 traceOutputOptions = "ProcessId, DateTime"
                />
        </sharedListeners>
    <switches>
        <add name="System.Net" value="Verbose" />
        <add name="System.Net.Sockets" value="Verbose" />
        <add name="System.Net.Cache" value="Verbose" />
        <add name="System.Net.HttpListener" value="Verbose" />
    </switches>
    </system.diagnostics>
</configuration>

Published Tuesday, March 24, 2009 11:28 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