[ACCEPTED]-How to display localhost traffic in Fiddler while debugging an ASP.NET application?-web-traffic
try using this:
http://ipv4.fiddler/folder
instead of
http://localhost/folder
this also works 1 with ports
http://ipv4.fiddler:12345/folder
Here is link to fiddler documentation
http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/MonitorLocalTraffic
To make Fiddler work on localhost with IIS 3 Express you should use this form of URL
http://localhost.fiddler:50262/
This 2 puts correct Host header value (localhost) which 1 satisfies IIS Express.
Start Fiddler. Go to Tools--> Fiddler Options. Choose 3 Connections tab. Check the 'USe PAC Script' option.
Now 2 you will be able to monitor local traffic 1 as well
For an ASP.NET web site project:
1) Right-click 5 the project and select Property Pages
2) Select 4 Start Options
3) Under the Server section, click 3 the "Use custom server" and edit the Base 2 URL by replacing localhost with your computer's 1 name.
Probably the easiest way to monitor traffic 2 to localhost is to replace "localhost" with 1 "localhost." in the browser's URL bar. E.g.
http://localhost./MyApp/default.aspx
Using Fiddler v4:
- Check your IE proxy settings
IE->Tools->Internet Options->Connections->Lan 6 Settings
- Check your settings in Fiddler:
Fiddler -> Options-> Connections 5 & Https
Check the Fiddler port, default 4 is 8888
- In Fiddler-Menu:
File -> Capture Traffic is checked
The 3 following solution worked for me, when using 2 a
- HttpClient or
- WebClient
from inside an ASP.NET application.
Web.config
<system.net>
<defaultProxy
enabled = "true"
useDefaultCredentials = "true">
<proxy autoDetect="False" bypassonlocal="False" proxyaddress="http://127.0.0.1:8888" usesystemdefault="False" />
</defaultProxy>
Code:
var resourceServerUri = new Uri("http://localhost.fiddler:YourAppServicePort");
var body = c.GetStringAsync(new Uri(resourceServerUri)).Result;
Check if your request actually reaches fiddler by customizing the Fiddler Rules script
Fiddler->Rules->Customize Rules
and 1 hook into the OnBeforeRequest event:
static function OnBeforeRequest(oSession: Session) {
if (oSession.hostname.Contains("localhost:YourPortNumber")
{
System.Windows.Forms.MessageBox.Show(oSession.hostname);
}
Or explicitly by setting a web proxy
WebClient wc = new WebClient();
WebProxy proxy = new WebProxy();
// try one of these URIs
proxy.Address = new Uri("http://127.0.0.1:8888");
proxy.Address = new Uri("http://hostname:8888");
proxy.Address = new Uri("http://localhost.fiddler");
proxy.Address = new Uri("http://ipv4.fiddler");
// https://en.wikipedia.org/wiki/IPv6
proxy.Address = new Uri("http://ipv6.fiddler");
proxy.BypassProxyOnLocal = false; wc.Proxy = proxy;
var b = wc.DownloadString(new Uri(YourResourceServerBaseAddress));
Check out this link...the 'workaround' is 1 hacky, but it does work:
You may use PC hostname instead of 127.0.0.1 1 or localhost
Checking the "Use PAC Script" in Fiddler 2 Options -> Connections worked for me when 1 using IIS Express within a corporate intranet.
Ensure that in your Fiddler Connections 2 that localhost isn't in the "IE should bypass 1 Fiddler for URLs that start with:" box.
You should uncheck the checkbox:
Bypass proxy 2 server for local addresses
Located at proxy 1 configuration of Internet Explorer.
Try with http://127.0.0.1. <-- note the . at the end
So 3 you can still connect to Casini and debug 2 easily (I'm currently debugging page on 1 http://127.0.0.1.:1718/login/Default.aspx ).
One of the possible solutions is remove 2 the proxy settings in IE as follows.
IE->Tools->Internet Options->Connections->Lan Settings->
disable 1 following
- Automatically detect settings
- Use automatic configuration script
If trying to catpure HTTPS traffic on a 3 local machine from BizTalk using Fiddler, try 2 using the WCF Adapter Proxy settings. I 1 used an address of: http://localhost:8888/
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.