Solved

Server Notification to WinClient?

Posted on 2002-07-15
8
252 Views
Last Modified: 2010-08-05
(I'm a newbie to .NET and SOAP calls, so please be gentle.)

Please consider this scenario (VB.NET):

1)  I have web-based functionality that I need users to leverage through HTTP protocol.
2)  When the user (via a WinClient app) submits binary data (again, via HTTP) to my web-side app, I will begin a new thread to process that data.  Therefore, control will be returned to the WinClient app very quickly.
3)  I need a way of:
     a.  Notifying the WinClient that processing is complete;
and     b.  Allowing the user (via a call to a Function) to retrieve his/her results of the procedure launched in step (2) above.

My question is, how do I do this?

I'm using a Web Service now where it makes sense, but I realized on Friday that I cannot merely create the client-side WebService "WithEvents" and expect the Web Service to relay notification events back to the WinClient.  In other words, this would not fly:

     '** Client-side VB.NET app
     Private WithEvents MyObj As New SomeWebApp.SomeWebService

     '** Catch those Server-side Web Service events here.
     '** Wouldn't THIS be handy?
     Private Sub MyObj_YourResultsAreReady()
           ...
     End Sub

But you see, I need functionality *LIKE* this.  I need the WinClient to somehow get notification from the Server *without* having to contantly poll a Web Service ("Are you done yet?  How about now?  How about now?") How do I work asyncronously with a server-side procedure, and still receive efficient notification in my WinClient app?

I'm going to make this a 200-point question, because I need more of an answer than just "use remoting" or something like that.  I can't expect a live, fully-documented solution for 200 points, but I do need some real help on how this can be done.  If you know of a website somewhere that contains a solution, then that would be great.

Thanks a lot.
0
Comment
Question by:bryker
  • 4
  • 3
8 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 7154584
The application is clientside and the webservice is serverside. You will need remoting to do what you want to do.

So, you will need to instantiate an object on the server and retrieve the events on the client. You can accomplish that through marshalling.

Use System.Remoting.RemotingServices and use the Marshal method (which is static, so you don't need to create an object) on your instantiated object (which should be derived from MarshalByRefObject).

CJ
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7154587
That way you CAN use WithEvents (as you probably already tried, you won't get any build errors).

CJ
0
 

Author Comment

by:bryker
ID: 7154769
And this could be done asynchronously?
0
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 22

Expert Comment

by:CJ_S
ID: 7156419
Yes (depending on the speed of the connection with the server, but basically it will be asynchronously)
0
 

Author Comment

by:bryker
ID: 7157251

CJ:

>use the Marshal method (which is static, so you
>don't need to create an object) on your
>instantiated object

Where is this object instantiated?  For instance, is it on the client, or is it on the server?  Wouldn't someone (client or server) then have to UN-marshal it, to complete the reference passing?
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7157376
AFAIk not, but am not sure.

Will create a small example later today.

CJ
0
 

Author Comment

by:bryker
ID: 7165860
I've had to move on from this problem.
0
 

Accepted Solution

by:
ComTech earned 0 total points
ID: 7165936
This question will be placed in PAQ, and points refunded.

Regards,

ComTech
Community Support Administrator  
Experts-Exchange  

User has found info elsewhere.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question