tags:

views:

40

answers:

1

I'm working on a Google Web Toolkit driven site that communicates via AJAX to a WCF server. Once deployed the GWT code will run in the same domain as the WCF service but when developing/debugging locally they both run as separate processes and therefore on separate ports. This causes my browser to assume that I'm making a cross site call and promptly blocks any server/client communication. As you can imagine, this doesn't make debugging a happy affair.

Anything I can do to convince my browser that it's okay to let localhost:1234 talk to localhost:5678?

(Focusing primarily on Chrome and Firefox, BTW)

A: 

So after a few days of suffering through development in IE, I finally found a very workable solution for this. I'm now running a HTTP Proxy servlet (one of the ones from this post) that catches any of my server-bound requests and forwards them to the right port.

Since it's a servlet it's easily distributable through our source control system, launches automatically when debugging, and doesn't get thrown in with the resulting Javascript when compiling! Almost a perfect solution! The only thing that could make it better is if Google packaged one with GWT. hint hint

Toji