All that is needed is to add the following to your app.config file and make sure that the account running the app has the right permissions:
<system.diagnostics> <trace autoflush="true" /> <sources> <source name="System.Net" maxdatasize="1024"> <listeners> <add name="mytracefile"/> </listeners> </source> <source name="System.Net.Sockets" maxdatasize="1024"> <listeners> <add name="mytracefile"/> </listeners> </source> </sources> <sharedListeners> <add name="mytracefile" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\ssltrace.log" /> </sharedListeners> <switches> <add name="System.Net" value="Verbose" /> <add name="System.Net.Sockets" value="Verbose" /> </switches> </system.diagnostics>
Original source can be found here.
Note, that you can also have this on your web.config to see what happens on the other end, but note that this is of limited utility for diagnosing SSL issues, as it will only log anything once the SSL handshake has completed.
No comments:
Post a Comment