Integration and Testing

Authorize.Net API questions and help with your payment integration.

Reply
Member
Posts: 9
Registered: ‎10-22-2010
Accepted Solution

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

 


Accepted Solutions
Solution
Accepted by topic author dnebeker7
‎03-28-2018 08:47 AM
Member
Posts: 9
Registered: ‎10-22-2010

Re: Raw response for logging from the .NET SDK

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


All Replies
Member
Posts: 9
Registered: ‎10-22-2010

Re: Raw response for logging from the .NET SDK

bump

Solution
Accepted by topic author dnebeker7
‎03-28-2018 08:47 AM
Member
Posts: 9
Registered: ‎10-22-2010

Re: Raw response for logging from the .NET SDK

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>  

 

Member
Posts: 1
Registered: ‎07-18-2018

Re: Raw response for logging from the .NET SDK

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