Session management in WCF service – client & server

Hi Folks,

I got the following email from one of my blog readers, here is his email:

Hi.. Marafacs,
I have a problem about WCF chat based on client-server. How to make a deal between server and client? So server can send message, show active client list, kick user.
Thanks for response.


To do this, you have first to configure your WCF to accept only client calls with sessions, and this is can be achieved by configuring the WCF with Service Throttling and configuring MaxConcurrentCalls,MaxConcurrentInstances and MaxConcurrentSessions.

Read this section to know how to configure this – page 331:
http://books.google.com/books?id=-AUyj6S7etwC&pg=PA331&dq=how+to+get+active+sessions+in+WCF&ei=tsTdStrhKITUNc_B9IEP#v=onepage&q=&f=false

To know, how the client can generate sessions and unique identifiers to the server, check below KB article, this is related to instance context sharing:

http://msdn.microsoft.com/en-us/library/aa354514.aspx

Hope this helps.

Regards,
Mostafa arafa

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>