Login to start a new topic
Answered

Capturing Soap Request from Visual Studio

Dear Fiddler Community,

I am fairly new to this so any help would be much appreciated, 

I have a Web Api running in Visual Studio on localhost:5000. From this application I send a SOAP request to an api. This request fails and the api provider asked me to show them the request body/header etc. 

I am struggling to find documentation on how to capture these SOAP requests as they don't normally show up on my Fiddler screen. 

Kind regards,

Attila


Best Answer

Hi Nick, 

Thank you for your reply,

You are absolutely right the thing I had the make sure of is the Visual Studio is routing the traffic through fiddler and once that was in place the SOAP request came up immediately.

In case anyone finds this thread and not sure how to do this on a .NET project:

https://blogs.infosupport.com/configuring-a-proxy-server-for-wcf/

This blog article helped me solve the issue. 

Basically your .NET app is not using the system proxy  by default. So changing your web.config to something like:
 

<system.net>
	<defaultProxy useDefaultCredentials="true">
		<proxy bypassonlocal="False" proxyaddress="http://localhost:8866" />
	</defaultProxy>
</system.net>

 For me fiddler was running on port 8866. You can check this yourself by clicking View (topleft) => Preferences => Connections => Fiddlers listens on port*:

For future reference the above instructions are for Fiddler Everywhere v3.4.0


The first thing to verify is that your Visual Studio project that runs on localhost is going through the Fiddler Everywhere proxy. Are you able to capture any HTTP/HTTPS request from that application? If not, then you probably need to configure your application to go through the Fiddler proxy (e.g. use localhost aliases, configure macnine.config, etc.).

Given that you can capture the request with Fiddler, then all you need to do is select the captured session and use the HTTP request inspector. The screenshot below demonstrates a basic request that sends a SOAP body.

Answer

Hi Nick, 

Thank you for your reply,

You are absolutely right the thing I had the make sure of is the Visual Studio is routing the traffic through fiddler and once that was in place the SOAP request came up immediately.

In case anyone finds this thread and not sure how to do this on a .NET project:

https://blogs.infosupport.com/configuring-a-proxy-server-for-wcf/

This blog article helped me solve the issue. 

Basically your .NET app is not using the system proxy  by default. So changing your web.config to something like:
 

<system.net>
	<defaultProxy useDefaultCredentials="true">
		<proxy bypassonlocal="False" proxyaddress="http://localhost:8866" />
	</defaultProxy>
</system.net>

 For me fiddler was running on port 8866. You can check this yourself by clicking View (topleft) => Preferences => Connections => Fiddlers listens on port*:

For future reference the above instructions are for Fiddler Everywhere v3.4.0

Login to start a new topic