Fiddler and the Visual Studio Development Server

Security Briefs

Syndication

If you are like me and are addicted to using Fiddler to debug HTTP sessions, you may be a little frustrated by the fact that you can't do this using Visual Studio's built-in HTTP server. Well, Dominick supplies an answer that he found on a German blog:

IE7 always bypasses proxies for "localhost" addresses. Regardless of configuration. Now when you want to use e.g. Fiddler with a local web app, this can become an issue.

If you are using IIS it's easy, just use the local machine name instead of "localhost" (something I usually do anyways because of SSL). But Cassini doesn't accept machine names - the (quite funny) workaround for that is to use "localhost." (note the dot) instead. Works fine....


Posted Feb 28 2007, 07:43 PM by keith-brown
Filed under: ,

Comments

EricLaw [MSFT] wrote re: Fiddler and the Visual Studio Development Server
on 03-07-2007 12:01 PM
That tip (and a few other alternatives) is also mentioned in the Fiddler FAQ and Connectivity help. :-)

http://www.fiddlertool.com/fiddler/help/knownissues.asp

and

http://www.fiddlertool.com/fiddler/help/hookup.asp

Scott Cowan wrote re: Fiddler and the Visual Studio Development Server
on 04-09-2007 7:10 AM
I just edit the hosts file and add another name for localhost

http://sleepoverrated.tumblr.com/post/457230
Martin Normark wrote re: Fiddler and the Visual Studio Development Server
on 04-13-2007 4:43 AM
I had a problem, with the Fiddler tool not accepting HTTP requests to the localhost.: URL.

If i disabled Fiddler, the URL worked just fine with the ASP.NET development server.

I modified a rule slightly, so that it accepts request from url: localhost.:ANY PORT.

Here it is:

if (oSession.host.substr(0, 10)=="localhost.")
{
oSession.host=oSession.host.replace("localhost.", "127.0.0.1");
}

Should be placed inside the OnBeforeRequest event handler

Add a Comment

(required)  
(optional)
(required)  
Remember Me?