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 / .NET SDK / March 2004

Tip: Looking for answers? Try searching our database.

Best method for callback into client from a server object

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Marlon R - 19 Feb 2004 15:02 GMT
I have a server object that updates SQL SERVER 2000 database from a
DataTable (passed from the client).

I want the client to call the server object method asynchronously, and then
received progress update on the database update process.

The question is:  What is best way to send update notification back to the
client from the server object?
Allen Anderson - 19 Feb 2004 16:27 GMT
Best way to do this is simply setup an event on the server side that
you subscribe to on the client side.  Remember, this event callback
will create a return connection (so if you have a firewall or router
you need to take this into account).  You can get bi-directional
channels that do this for you though.

Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com

>I have a server object that updates SQL SERVER 2000 database from a
>DataTable (passed from the client).
[quoted text clipped - 4 lines]
>The question is:  What is best way to send update notification back to the
>client from the server object?
RJ - 28 Feb 2004 03:46 GMT
Allen,
 I have been struggling with this very implementation, where I want
bi-directional communication between one server object and one remoting
client.  I have a SAO, whose methods are working properly when called from
the remoting client application, which runs on the same computer.  When I
add an event to the interface for the remoted class, the server object
raises the event, but the "listening" client never receives it.  The example
I based my event on, uses a second "Event Initiator" client, which simply
calls a "broadcast" sub on the server object.  The server object in turn
raises the event, and the "listening" client does receive the event.  I
can't seem to figure out why second "Event Initiator" client is needed, and
why the "listening" client, which has the event handler implemented, won't
work when the server object directly raises the event.  No exceptions
thrown.

Example1 - Client2 calls Svr.RaiseIt, which raises Event1, Client1 receives
Event1 successfully
Example2 - Svr directly raises Event1, Client1 does not receive Event1

Any ideas are much appreciated.

RJ

> Best way to do this is simply setup an event on the server side that
> you subscribe to on the client side.  Remember, this event callback
[quoted text clipped - 14 lines]
> >The question is:  What is best way to send update notification back to the
> >client from the server object?
Sunny - 01 Mar 2004 16:22 GMT
Hi RJ,
please, check that the client and the server are referencing one and the
same object! WEhat kind of SAO is this - Sigleton, Singlecall. If this
is Singlecall, there is no way to make the server and the client to
point at the same object. If it is singleton, please, post your code for
exposing the server object to remoting, so I can take a look.

Sunny

> Allen,
>   I have been struggling with this very implementation, where I want
[quoted text clipped - 39 lines]
> the
> > >client from the server object?

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.