Silverlight ClientHttp Stack / windows authentication / and RIA services issue (I'm guessing it's a cookie thing)

StackOverflow https://stackoverflow.com/questions/13368302

Question

I was investigating how to get status code 500 error messages to give me more information when these occur and happened upon the MSDN post about using the ClientHttp stack.. Which was all just so magical seeming until the application got deployed on the staging servers and it seems to completely fail now with authentication

I'm guessing this is due to the whole cookie issue as it relates to the ClientHttp stack... I'm using RIA services and when the application starts it runs 3 or 4 RIA WCF service calls preloading data in the background and now with the new ClientHttpStack an authentication dialog pops up pretty much every single time a request is made. We're using Windows Authentication so before it would just make you authenticate in order to access the page serving the XAP file... But now you login with Win Auth and then all the subsequent calls repetitively ask for your credentials...

I'm assuming the only way I can fix this is by doing this http://msdn.microsoft.com/en-us/library/dd920298(v=vs.95).aspx

And then possibly adding an endpoint behavior onto the DomainClient so that before requests are handled it tacks on the cookies...

I've tried doing this for a bit now and I'm not really succeeding... When I run the app in FF or Chrome it still pops up with a whole bunch of login boxes. So I'm just curious if I'm barking up the wrong tree or if I should continue trying to figure out where I'm not quite propagating the cookies through

Was it helpful?

Solution

If you are using the ClientHttp stack, you'll need a place to store your cookie client side, said a HttpCookieContainer. It's just a wcf behaviour to be inserted in the ClientHttp stack.
Please, have a look at this post from Kile McClellan and see if it helps you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top