views:

248

answers:

2

Hi,

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!

+1  A: 

Your problem is not specific to SL. In general, XMLHttpRequest is used for making AJAX calls ("background" HTTP requests) that do not cause browser navigations.

If you want to cause browser navigation, instead of using XMLHttpRequest to the logout URL, you should change the current window location (through the window.location object).

Franci Penov
+2  A: 

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.

AnthonyWJones