cancel
Showing results for 
Search instead for 
Did you mean: 

Raw response for logging from the .NET SDK

How do I get the raw response string returned from the .NET SDK?  I'm guessing it would come from the controller, but I can't find where the string is exposed.

 

It needs to be logged so we can get help with a failing transaction from support.


Thanks

 

dnebeker7
Member
1 ACCEPTED SOLUTION

Accepted Solutions

For anyone else that comes along later, the .NET SDK uses System.Diagnostic.Tracing to write the response string.  So you can add the following to your .config file and get the raw response string written to a log file.

 

<system.diagnostics>  
    <trace autoflush="true" indentsize="4">  
      <listeners>  
        <add name="myListener"   
          type="System.Diagnostics.TextWriterTraceListener"   
          initializeData="C:\MyLogFile.txt" />  
        <remove name="Default" />  
      </listeners>  
    </trace>  
  </system.diagnostics>  

 

View solution in original post

dnebeker7
Member
3 REPLIES 3

bump

dnebeker7
Member

For anyone else that comes along later, the .NET SDK uses System.Diagnostic.Tracing to write the response string.  So you can add the following to your .config file and get the raw response string written to a log file.

 

<system.diagnostics>  
    <trace autoflush="true" indentsize="4">  
      <listeners>  
        <add name="myListener"   
          type="System.Diagnostics.TextWriterTraceListener"   
          initializeData="C:\MyLogFile.txt" />  
        <remove name="Default" />  
      </listeners>  
    </trace>  
  </system.diagnostics>  

 

dnebeker7
Member

So there is no way to programmatically get to the response string?  Is there a reason why you would leave this feature out?