
You can use Percall service with concurrency mode set to multiple. So having Persession wont make any difference. On the other hand webhttpbinding doesnt support Session. It is recommended to use Singleton service when you need sequential access to something where concurrency is not permitted. Response is slow when you are using singleton service.Ĥ. This is a major development effort to handle sync issue in code.ģ. In addition to that all request to service will run on different worker thread,so the service will have synchronization issue unless you handle that in code.

So in heavy load you will struggle with performance and throughput.Ģ. You will face scalability issue with Singleton service. Singleton Service Instance mode has its limitation.ġ. All I want is that my client and server will use the same I have no idea what I am doing wrong here. }The service implementation will use the following behavior, just in case it would matter. Var str = jsonSerializer.ReadObject(respStream).ToString() Var jsonSerializer = new DataContractJsonSerializer( typeof( string)) Var respStream = resp.GetResponseStream() HttpWebResponse resp = req.GetResponse() as HttpWebResponse Stream postData = req.GetRequestStream() Req.ProtocolVersion = HttpVersion.Version11 Var req = WebRequest.Create( " as HttpWebRequest Here ist the some sample client code, wrapped into a procedure, that is called multiple times: BasicHttpBinding and webHttpBinding will allow these persisting connections by default.

WCF will try and reuse connections (allegdedly), if I have the option keep-alive=true and I either close the httpResponse or dispose the HttpWebQuest.Ģ. (TIME WAIT) and the client cannot connect anymore.ġ. Whenever I send a new Request to the server, a new connection is being established, what means that I can see how new client sockets pop up in TCPView. My problem is that WCF won't reuse any connections. I made some performance tests to find out how fast I can send and retrieve some easy JSON data objects via HTTP and WCF. I have a httpwebclient Application and a test server application running on the VS test server locally. After spending a couple of hours on this issue, I think I need some expert help here.
