Tuesday 15 February 2011

localhost - Allowing "Cross-Site" calls between local ports -


I am working on a Google Web Toolkit driven site that communicates by AJX on WCF server. Once the GWT code is deployed it is run as a WCF service in the same domain, but when running locally / debugging, they run both as separate processes and therefore on different ports. This is the reason for my browser to believe that I am cross-site calling and immediately block any server / client communication. As you can imagine, this does not debugging a happy case.

I can do anything to convince my browser that it is okay to local host: 1234 Talk to local host: 5678?

(primarily focusing on Chrome and Firefox, BTW)

After a few days after IE, I finally found a very useful solution for this. I am now running a HTTP proxy serverlet (which is one of those) that captures my server-bound requests and sends them to the right port

Since this is servlet, it is our source control Easily distributed through the system, it starts debugging automatically, and when compiled, the result is not thrown with javascript! Almost a perfect solution! The only thing that can make it better, if Google has packed a hint signal

with GWT

No comments:

Post a Comment