I would guess that there is a third session somewhere. What you're seeing is most likely due to a little-known (until it bites you, like now) recommended connection-limitation in the HTTP-protocol. Section 8.1.4 of RFC2068 says A single-user client SHOULD maintain AT MOST 2 connections with any server or proxy I've experienced the same limitation myself, most recently on Windows Phone 7 The limit lies in the WebRequest and the solution is to increase the limit: set connection limit to 5 ServicePointManger.
DefaultConnectionLimit = 5 See e.g. This old blog entry from David Kline.
I would guess that there is a third session somewhere. What you're seeing is most likely due to a little-known (until it bites you, like now) recommended connection-limitation in the HTTP-protocol. Section 8.1.4 of RFC2068 says "A single-user client SHOULD maintain AT MOST 2 connections with any server or proxy".
I've experienced the same limitation myself, most recently on Windows Phone 7. The limit lies in the WebRequest and the solution is to increase the limit: // set connection limit to 5 ServicePointManger. DefaultConnectionLimit = 5; See e.g. This old blog entry from David Kline.
Thanks. It was the issue. Besides the fact I could of course increase the connection limit, I went the way I restructured my app and put the connection checking and web service connection stuff in one thread.
Thanks! – dominolog Feb 21 at 22:35.
NET CF 3.5 Windows Mobile 6.5 application. I have 2 threads. In 2n thread a call a WebService through a SoapHttpClientProtocol based class generated by WebService reference.
In both cases the url is the same. The 1st thread is used for connection checking purpose. It does the WebRequest periodically to check whetrher the server is available and displays the connection status (not shown in code).
2nd thread calls WebService on the same server (url). I observed, that when one thread is executing a WebRequest the 2nd one gets blocked or event timeouted while executing a Web Method. They both look as interfering each other.
I wonder if windows mobile network stack simply creates only one socket connection for both threads if it realizes that both goes to the same target IP:port? What about sessions? On desktop Windows I would expect 2 sessions being created and at least 2 sockets on client machine.
Does anybody have any hints on how Windows Mobile (or . NET CF) manages connections and socket reusage?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.