views:

334

answers:

2

Does anyone know if it is possible to discover that a response from a WCF call in Silverlight resulted in a 302 (temporary redirect).

The 302 is generated because our service is behind ISA and the user session timesout. The Silverligt app remains loaded in the browser and the usre interacts to make a WCF call which fails. I can get a Not Found error but this is also reported for a number of different issues so not really a solution. I want to specifically target a 302 and refresh the page to get the user to reauthenticate.

A: 

I'm wondering this as well! Anyone?

A: 

I was looking for an answer to the same question, but have decided not to use this approach to solve the problem I was dealing with, so I don't have a compelte solution for you, but if you are using Silverlight 3, then you may be able to solve it. I got as far as using the alternate Http stack as discussed at the bottom of this page:

http://developers.de/blogs/damir%5Fdobric/archive/2009/08/22/soap-faults-and-new-network-stack-in-silverlight-3.aspx

This at least allowed me to gain access to SOAP faults, but I don't know if/how you can access HTTP 302 responses, since when I tried to do so, I found that Silverlight appeared to actually follow the redirect and re-issue my SOAP request there rather than report it back to my application.

What I did start investigating though is how this might be changed using behaviors. I didn't get very far with this investigation though so don't know if its feasible or not!

Rixy