Capturing internal query requests to a violinist

I have a web application and call WCF and ASMX services to get information. But in Fildder, I can only see aspx aspx requests for web applications, not WCF and asmx calls.

How can I capture these WCF and asmx calls in Fiddler traffic.

If fiddler does not have this option, suggest other tools.

+4
source share
2 answers

By default, Fiddler acts as a proxy server that captures the traffic that passes through it.

When you run Fiddler on your client , your browser passes the request through Fiddler on the way to the server. If your client and server are on the same PC, traffic sent to localhost or 127.0.0.1 can be bypassed by Fiddler due to hard-coded restrictions in the .NET Framework (this is not the case with browsers).

To solve this problem, you can update your .NET code to fall into one of the aliases for localhost that Fiddler supports using: localhost.fiddler or ipv4.fiddler or ipv6.fiddler .

If Fiddler is running on a server and you want to capture requests made by your server code (for example, outgoing requests from ASP.NET), you need to configure your ASP.NET application to send its traffic to Fiddler. This is because when Fiddler starts, it configures the current user to send their traffic to Fiddler, but ASP.NET works inside the Windows Service account, and not inside the current user account. There are several ways to capture requests made from within ASP.NET, but this blog post contains the simplest. Update the appropriate machine.config (usually a 64-bit version of the file) to contain the line

<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />

Now, if Fiddler is running on a different server , you will need to configure the proxy server to point to some computer that runs Fiddler, for example

<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://MyFiddlerServer:8888" usesystemdefault="false" />

+7
source

Fiddler works by intercepting web requests on a single port (say 8888) and then redirecting the request to the actual destination port that you set in WCF (say 8000). This allows Fiddler to capture two-way traffic between the host and client.

So, you should have a script that works both on the client and on the host. Then, after starting Fiddler, go to the "Tools" menu and select "Fiddler Settings", making sure that it listens on port 8888. Then go to the "Rules" menu, select "Configure Rules" and add some code to the "Handlers" class as follows way:

 if (oSession.host=="localhost:8888") { oSession.host="localhost:8000"; } 

Then change the client application to use 8888 (instead of the usual port #), and then run the program. If set up correctly, Fiddler will act as a person in the middle, intercepting and recording requests and responses.

Good luck. If this works as an answer, be sure to tag it.

-2
source

Source: https://habr.com/ru/post/1502400/


All Articles