Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Server Notification to WinClient?

Posted on 2002-07-15
8
Medium Priority
?
260 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Loops Section Overview
Suggested Courses

972 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