Question

I just upgraded the ServiceStack assemblies in our Silverlight app from 4.0.9 to 4.0.20.

It seems that the cookies are not persisted with the new version. The JsonServiceClient is created as follows:

return new JsonServiceClient(this._address.ToString()) { StoreCookies = true, ShareCookiesWithBrowser = false };

(it does not matter if I specify ShareCookiesWithBrowser or not)

When I check with Fiddler the response to my initial POST request to /auth is as follows:

HTTP/1.1 200 OK
Cache-Control: no-store,must-revalidate,no-cache,max-age=0
Transfer-Encoding: chunked
Content-Type: application/json; charset=utf-8
Vary: Accept
Server: Microsoft-HTTPAPI/2.0
Set-Cookie: ss-id=5cwF1pftMI0R2LphJMjr;path=/
Set-Cookie: ss-pid=KnLVQCQtQe9pvBilJBXU;path=/;expires=Sun, 14 May 2034 13:34:03 GMT
Set-Cookie: X-UAId=;path=/;expires=Sun, 14 May 2034 13:34:03 GMT
X-Served-By: XY Server/2014.1.0 (rev 0) RC1 - XYServer
X-Powered-By: ServiceStack/4,020 Win32NT/.NET
Date: Wed, 14 May 2014 13:34:03 GMT

But the next request I make looks like this:

GET http://localhost:8082/api/server/info HTTP/1.1
Accept: application/json, */*
Accept-Language: nl-NL
Referer: http://localhost:4637/ClientBin/ServerManagerLite.xap
Accept-Encoding: identity
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; Trident/7.0; .NET4.0E; .NET4.0C; InfoPath.3; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729; rv:11.0) like Gecko
Host: localhost:8082
DNT: 1
Connection: Keep-Alive

Am I missing an essential line of code here?

UPDATE: This is fixed in version 4.0.21

Thanks, Robert van Drunen

Was it helpful?

Solution

UPDATE: This is fixed in version 4.0.21

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