WCF - Slow when initializing connection.

Joined
Jan 10, 2007
Messages
43,898
Location
In The Machine
Good afternoon.

I have noticed that for some reason, my WCF communications sporadically take a while to connect.

Both the client and the server are on the same LAN, so bandwidth is not an issue, but it seems that as soon as I try to invoke a sub / function on the client, there is a 1~2 second delay that I cannot account for.

I have put stopwatches in the code on the server side, and as soon as the request is recieved, the response is sent in under 10ms.

It just seems to me that it is taking a while to initialize the connection.


Which brings me further to: Am I doing this the right way?

My WCF service is configured as the default (I believe) PerCall mode.

The clients can sometimes query the server for info up to 100 times per minute, so I am thinking I might be better off with a Singleton service? Am I right?

Also, I have found numerous places that detail how I can change to a singleton service in code, but how do I specify Singleton behaviour in XML? (app.config)


More...

View All Our Microsoft Related Feeds
 
Back
Top