views:

75

answers:

2

Hello everybody,

I have a webapplication which uses an external webservice to send files and messages. The IIS runs on a Windows2003 Server.

I now need to log somehow the requests which are send by the ASP.NET-MVC application to the external service. In Fiddler2 I just can see the incoming answers from the webservice, but I cannot see the requests which are sent from my application. I need to see the whole XML Soap request.

I've already added this to the web.config

<system.net>
    <defaultProxy>
      <proxy bypassonlocal="false" usesystemdefault="true" proxyaddress="http://127.0.0.1:8888" />
    </defaultProxy>
  </system.net>

Does anyone know what else I can do?

Thanks

A: 

You could activate tracing at the client side:

<trace autoflush="true" />
<sources>
  <source name="System.Net">
    <listeners>
      <add name="TraceFile" />
    </listeners>
  </source>
</sources>

<sharedListeners>
  <add
    name="TraceFile"
    type="System.Diagnostics.TextWriterTraceListener"
    initializeData="NetTrace.log" />
</sharedListeners>

<switches>
  <add name="System.Net" value="Verbose" />
</switches>

Darin Dimitrov
In the `NetTrace.log` which will be created at your site root.
Darin Dimitrov
A: 

How did you created proxy to your web service? If you used Add Web Reference you can create custom SoapExtension to log communication. MSDN contains exactly this sample. If you used Add Service Reference you can start with build in WCF message logging. If you want customized mechanism you can build your own custom client message inspector.

Edit:

Btw. Fiddler also offers application integration but I have never used it.

Ladislav Mrnka