Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Silverlight: Caching of negotiate response leads to blizzard of requests #522

Closed
samueldjack opened this Issue · 1 comment

2 participants

Samuel Jack David Fowler
Samuel Jack

Just discovered an interesting issue with the Silverlight client. It seems that the browser or the silverlight http stack is caching the response of the /negotiate requests, leading to all clients opened in the browser being allocated the same connectionId.

This causes the clients to continually reconnect to the server, because the connection of a new client with the same connectionId cause previous connections to be ended.

A "quick fix" on the client side is to amend GetNegotiationResponse in HttpBasedTransport so that the first line reads

string negotiateUrl = connection.Url + "negotiate?noCache=" + Guid.NewGuid().GetHashCode();

This ensures each negotiate request has a unique url, so no caching of the response can take place.

A better fix would be to make sure that the server adds the appropriate no-cache headers to the negotiate response.

David Fowler
Owner

We actually changed to use the ClientHttp stack.

David Fowler davidfowl closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.