Fiddler and the Live fx Resource Browser are the dynamic duo that debug my Live Framework applications. Recently I started doing some things that were specific to the local Live Operating Environment (LOE) and Fiddler doesn’t do that by default.
In order to use Fiddler with a local port you have to put it in reverse proxy mode which is described in the Fiddler help documentation. I followed that procedure and could then make a request from the Resource Browser into Fiddler which then routed into the local LOE. And there was much rejoicing! Almost. Here is what Fiddler showed me.
GET / HTTP/1.1
HTTP/1.1 400 Bad Request
Content-Type: text/html; charset=us-ascii
Date: Wed, 04 Mar 2009 15:56:00 GMT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Bad Request – Invalid Hostname</h2>
<hr><p>HTTP Error 400. The request hostname is invalid.</p>
As you can see in the highlighted portion, the LOE returned an error. As it turns out, the current version of Fiddler translates “localhost” to “127.0.0.1” during its proxy forwarding to the LOE. Unfortunately the current CTP client of the Live Framework will not accept requests to that hostname. You can verify that by pointing the resource browser to 127.0.0.1:2048 and you will see the same response.
Fortunately an upcoming version of Fiddler takes care of this by changing the default local hostname to “localhost” as well as allowing the user to set the local hostname if needed.
If you are having this problem and cannot wait for the next Beta of Fiddler to arrive you can get the latest Alpha (use at your own risk!) from the Fiddler site at http://www.fiddler2.com/dl/Fiddler2AlphaSetup.exe