Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
I have a project using remoting with host server and client, I would like to know how can I able only 2 users use the host server at a time and prevent more tries using thraeds.
Posted 19-Jun-12 22:11pm
Comments
Stephen Hewison at 20-Jun-12 4:26am
   
How are you providing remoting? Via WCF? or an older style web service?
Sandeep Mewara at 20-Jun-12 8:33am
   
OP replied:
With TCP channel
Member 7966831 at 20-Jun-12 4:33am
   
With TCP channel
Stephen Hewison at 20-Jun-12 4:59am
   
Not worked with tcp channel but after a google I can't find information relating to concurrency in its configuration. I would suggest, assuming this is a single process, that you add thread safe code with a usage counter, increment the counter at the entry point on the remote method. Decrement the count on the exit and throw and exception if you're at your desired limit. Although it's much easier with WCF and web services as you can limit users using the concurrency and instancing settings in the configuration or the web gardening settings in IIS.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 20 Jun 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100