Tuesday, February 23, 2010

Monday, February 15, 2010

Down and dirty with Trace Listerners for SOAP Messages

Recently I was trying to implement a web service call for a client who had another firm implementing a very secure web service using client certificates (Ill blog about how to get that working sometime soon). However once Id got the security sorted I was getting a Method not allowed 403 error in order to diagnose the problem I needed ot get at the raw data travelling across the wire. as it happens dot net has a brilliant diagnostics suite which is really simple to implement. Simply add the following into your web.config file underneath the system.web node and presto youll get a trace.log file will all that lovely low level info in!

Original Article here on StackOverflow; http://stackoverflow.com/questions/300674/getting-raw-soap-data-from-a-web-reference-client-running-in-aspnet


    <trace autoflush="true"/>
      <source name="System.Net" maxdatasize="1024">
          <add name="TraceFile"/>
      <source name="System.Net.Sockets" maxdatasize="1024">
          <add name="TraceFile"/>
      <add name="TraceFile" type="System.Diagnostics.TextWriterTraceListener" initializeData="trace.log"/>
      <add name="System.Net" value="Verbose"/>
      <add name="System.Net.Sockets" value="Verbose"/>
Read More