Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Silverlight: Caching of negotiate response leads to blizzard of requests #522
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.