Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / August 2003

Tip: Looking for answers? Try searching our database.

Exception when trying to connect

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fabr?cio de Novaes Kucinskis - 21 Aug 2003 18:33 GMT
Hi all,

I have a load balancing app (isn't to a WebSite or WebFarm). In this
application, all computer can be a client from, or a server to, another
computer in the network.

This app has a sort of different objects to manage. Each object provides a
service to clients.

These objects are published based on a pre-determinated scenario (for
example, three objects in one computer, two in another...) and can be
migrated by the app to another computer, depending on the status of the
computers. These status is constantly updated in a shared database, which is
used to determine the objects to migrate where they're located.

Another application is a client to the published objects. Based on the info
in the database, this app connects to the objects in the right place, and
consumes its services.

Well, my problem is: when all the objects are in an unique computer, local
or not, the client connects to the objects published, but when there are
objects in more than one computer, I got the following exception:

                                           "Object </ObjectName> has been
disconnected or does not exist at the server."

I verified the path, and it's correct. The problem isn't the Lifetime Lease,
too.

I have no idea about why this exception didn't occurs when all objects are
in an unique computer, even when its computer is other than the computer
where the client app is running. The objects are not related each other.

Am I forgetting something?

                                           //This is a sample of the code
in the executable wich the objects are published based on the scenario
                                           private static TcpChannel
channel = new TcpChannel(8024);

ChannelServices.RegisterChannel(channel);

RemotingConfiguration.RegisterWellKnownServiceType(typeof(Log), "Log",
WellKnownObjectMode.Singleton);

****************************************************************************
*********

                                           //This is a sample of the code
in the client app ('ip' comes from the database)
                                           log = (Log)
Activator.GetObject(typeof(Log), "tcp://" + ip + ":8024/Log");

I'm not sure if I could explain my problem clearly. If not, please, let me
know.
Thanks in advance,

Fabr?cio de Novaes Kucinskis.
Raghu Rudra - 21 Aug 2003 20:11 GMT
I am not sure if this answers your question or not.

If you are doing any load balancing, you should be using RealProxy. I don't
find any thing wrong with your client code. But the following article shows
how to handle load balancing:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/h
awkremoting.asp


If you are still getting the error, may be simply retry operation will
suffice. For example, when get an exception, simply retry the code that
calls Activator.GetObject again. It worked for us before.

> Hi all,
>
[quoted text clipped - 40 lines]
> RemotingConfiguration.RegisterWellKnownServiceType(typeof(Log), "Log",
> WellKnownObjectMode.Singleton);

****************************************************************************
> *********
>
[quoted text clipped - 8 lines]
>
> Fabr?cio de Novaes Kucinskis.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.