In my current project I have to deal with a reverse proxy environment on production.
Unfortunately you can not debug your application on Production and usually there is no real reverse proxy testing environment available.
To test my WCF-Silverlight application I used Fiddler and custom rules to establish a decent test environment.
Goal:
To have a reverse proxy behaviour
from
http://mymachine:8888/Default.aspx
to
http://mymymachine:80/testApp/Default.aspx
To add these rules:
Fiddler -> Rules -> Custom Rules
Inside the Java Script function OnBeforeRequest(oSession: Session) add the following lines:
static function OnBeforeRequest(oSession: Session)
{
if (oSession.host.toLowerCase() == "myMachine:8888"){ oSession.host = "mymachine:80";}
if( !oSession.uriContains("testApp/")){ oSession.PathAndQuery = "/testApp" + oSession.PathAndQuery; }
…
Something interesting to note is the check for testApp.
If you always add the new URI part (what I first did) the MS Ajax engine gets confuesed and adds testApp/testApp to the Resources…
Finaly I can exactly see what my WCF Service sends to the server and where it goes wrong.
That’s it!
Tom