Friday 19 March 2010

Localhost not working in fiddler - a solution

I was testing my .net site in Internet Explorer today using Fiddler. The Visual Studio development server uses localhost with a random port. However, Fiddler will not captures responses from localhost.

Don't worry, though. There's a neat trick you can do to fix this localhost error. Let's use an example. If you are testing the page:

http://localhost:2622/MySite/Default.aspx

simply change it to:

http://somesite.com:2622/MySite/Default.aspx

The url http://www.somesite.com points to localhost. 

This is a really neat trick for working around the fiddler localhost restriction.

The proof:
Hooray!

No comments: