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 / Remoting / September 2004

Tip: Looking for answers? Try searching our database.

Restart of client application

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kashif - 09 Sep 2004 13:35 GMT
Hi All
i had a little bit tricky scenario
I have a server apoplication eposing remote object ,
Oject is used by client application and client object is passed as proxy to
server using callback mechanism

Now every thing works fine but after some time  (in this time their is no
communication b/w server & CLIENT) calling method on client object by server
results in exception  9service not available).

So wats a way to increase lifetime of proxy object to remain for ever even
their is no communication
secondly how i can check that proxy is still refer to some remote object (
To know either server is running or not)

thanks in advance

kashif
Programmer
Ken Kolda - 10 Sep 2004 16:05 GMT
You need to override the InitializeLifetimeServices() method in your client
object. You can return NULL if you wish the object to live indefinitely.

Of course, this doesn't resolve the issue of the client being stopped and
your server having a reference to a now-inaccessible object. What you need
to do is make sure that when you invoke the proxy you are catching any
exceptions that may arise due to the disconnect. If the client is
disconnected, the server should drop the proxy it's holding. There is no
built-in call to detect is the proxy is still connected to a client object
(plus, even if there were, there's no guarantee the client wouldn't die
between the time of this call and the time you invoke the actual callback
method).

Ken

> Hi All
> i had a little bit tricky scenario
[quoted text clipped - 15 lines]
> kashif
> Programmer
kashif - 29 Sep 2004 06:32 GMT
Thanks Ken
i got resolved my issue by returning NULL by overridinG
InitializeLifetimeService() method as dictated by u
Thanks again
Regards

> You need to override the InitializeLifetimeServices() method in your client
> object. You can return NULL if you wish the object to live indefinitely.
[quoted text clipped - 32 lines]
> > kashif
> > Programmer

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.