Click here to Skip to main content
13,004,123 members (109,928 online)
Rate this:
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 21:11pm
Stephen Hewison 20-Jun-12 4:26am
How are you providing remoting? Via WCF? or an older style web service?
Sandeep Mewara 20-Jun-12 8:33am
OP replied:
With TCP channel
Member 7966831 20-Jun-12 4:33am
With TCP channel
Stephen Hewison 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170627.1 | Last Updated 20 Jun 2012
Copyright © CodeProject, 1999-2017
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