473,406 Members | 2,956 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Using .NET Remoting with multiple users

I am developing a client/server app and would like to use .NET Remoting to
allow the server to communicate with clients. I've been able to test this
with a single client, but .NET Remoting seems to make it very difficult to
establish connections with multiple users. This is the code I use for
connecting a single user:

IDictionary props = new Hashtable();
props["port"] = "0";
props["name"] = RemoteMachineName;
TcpChannel channel = new TcpChannel(props, null, null);
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownClientType( typeof(RemoteObject),
"tcp://" + RemoteMachineName +
":9999/ExamProctor/RemoteObject");

This works fine and allows be to connect to the remote object as expected.
When I try to connect another user, the call to RegisterWellKnownClientType
fails indicating that the remote object has already been redirected. Is
there any way to use .NET Remoting to establish remote objects on multiple
clients?
Nov 17 '05 #1
2 7433
There are two ways to set this up:

RemotingConfiguration.RegisterWellKnownClientType( typeof(RemoteObject),
"tcp://" + RemoteMachineName +
":9999/ExamProctor/RemoteObject", WellKnownObjectMode.SingleCall);

RemotingConfiguration.RegisterWellKnownClientType( typeof(RemoteObject),
"tcp://" + RemoteMachineName +
":9999/ExamProctor/RemoteObject", WellKnownObjectMode.Singleton);
By default, it is set to Singleton. This is not a bad thing, in some
instances, but is likely the source, or at least part of the source, of your
problem. Check out:

http://www.devx.com/dotnet/Article/6965/
--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
"Paul Steele" wrote:
I am developing a client/server app and would like to use .NET Remoting to
allow the server to communicate with clients. I've been able to test this
with a single client, but .NET Remoting seems to make it very difficult to
establish connections with multiple users. This is the code I use for
connecting a single user:

IDictionary props = new Hashtable();
props["port"] = "0";
props["name"] = RemoteMachineName;
TcpChannel channel = new TcpChannel(props, null, null);
ChannelServices.RegisterChannel(channel);
RemotingConfiguration.RegisterWellKnownClientType( typeof(RemoteObject),
"tcp://" + RemoteMachineName +
":9999/ExamProctor/RemoteObject");

This works fine and allows be to connect to the remote object as expected.
When I try to connect another user, the call to RegisterWellKnownClientType
fails indicating that the remote object has already been redirected. Is
there any way to use .NET Remoting to establish remote objects on multiple
clients?

Nov 17 '05 #2

"Cowboy (Gregory A. Beamer) - MVP" <No************@comcast.netNoSpamM> wrote
in message news:24**********************************@microsof t.com...
There are two ways to set this up:

RemotingConfiguration.RegisterWellKnownClientType( typeof(RemoteObject),
"tcp://" + RemoteMachineName +
":9999/ExamProctor/RemoteObject", WellKnownObjectMode.SingleCall);

RemotingConfiguration.RegisterWellKnownClientType( typeof(RemoteObject),
"tcp://" + RemoteMachineName +
":9999/ExamProctor/RemoteObject", WellKnownObjectMode.Singleton);


Do you mean "RegisterWellKnownServiceType"? No form of
"RegisterWellKNownClientType" take three arguments.
Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: mary | last post by:
I am developing an Access db which will be used by multiple users. My questions are: Does MS Access have problems with multiple users accessing the db at once? If yes, what is your solution...
12
by: Berj | last post by:
i have a novice question. is Access multi-user? can multiple users access the same database?
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
7
by: jsale | last post by:
I have made an ASP.NET web application that connects to SQL Server, reading and writing data using classes. I was recommended to use session objects to store the data per user, because each user...
3
by: Peter Fox | last post by:
I have no intention of using any such mechanism to distinguish users of my PHP applications, but I was wondering (and it isn't easy for me to test) ... ....On a single PC with a single browser...
5
by: Lambuz | last post by:
First of all, is it possible usign .NET remoting feature inside a .NET applet loaded into a tag object inside an HTML page ? <OBJECT id="myID" height="150" width="300"...
3
by: Karthik D V | last post by:
Hi Friends, How do I upload files using remoting? Thanks
0
by: kalinda | last post by:
I am trying to make multiple joins between two tables and am at a loss. I've tried a variety of things with this being the latest, but it pulls all records multiple times. Basically I have a main...
1
by: Nicholas Davenport | last post by:
Hi I hope someone can shed some light on this for me I have been tasked with creating an outbound database system for multiple users. The database will receive a new batch of data on a monthly...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.