Javascript – Redirect to different domain URL (google app engine logout) doesn’t work from silverlight + javascript

google-app-enginejavascriptsilverlight

I see the following behavior:

When I call javascript XMLHttpRequest/open/send from silverlight, for a URL that eventually causes HTTP redirect to a different domain (logout URL in google app engine), than the silverlight application was loaded from, the browser doesn't follow the redirect.

When I go to the same URL either manually from the browser, or using a link on the same page where the silverlight application is, everything work fine – the browser follows redirect correctly.

Does anyone know the cause for such difference in behavior / is there any workaround / configuration to avoid it?

Thanks!

Best Answer

The XMLHttpRequest will block cross domain requests. Even if the initial request is to the same domain as the current document any redirection coming back must also be within the same domain.

Related Topic