Subject: .NET Remoting application in vb.net
Posted By: Tek4VB Post Date: 11/17/2003 5:49:48 PM
I need to build a VB.NET app (exe) that will reside on one machine, and will communicate with clients (browser sessions on the network). I need to have the clients send data that will be "seen" by the vb app, which then in turn will process data and handle a bunch of other tasks. The client is already built in an ASP.NET App. The problem I am having is in the "server" vb app, how do i communicate with browser clients?  I mimiced the "server" functionality in a web service but that is not the model I want to use. I need to be doing Remoting but I don't know where to start on the server portion (vb exe).

Please, any help is greatly appreciated!
(I have exhausted every ms link I could find, but none have an example of what I am trying to do)
THANKS!
Reply By: planoie Reply Date: 11/17/2003 9:28:19 PM
There isn't really a way to communicate TO a client browser (oh wait.. what ever happened to push technology?? ).  It sounds like you could use something like this (I'm a web guy so my suggestions usually involve web stuff):

You have an ASP.Net app on a server.  It does whatever it is you need it to do.

You create a web service on that server, or you just add web service files to the existing web application.  This web service will provide access to the data that the asp.net application also uses.

Then you create a VB.Net desktop application that talks to the web service to get data.  It can then go off and do its work and when complete call back to the webservice to send data that's been processed.


I just found this article which might be useful to you:
http://www.codeproject.com/vb/net/RemotingTech.asp

Peter
------------------------------------------------------
Work smarter, not harder.
Reply By: Tek4VB Reply Date: 11/17/2003 10:24:44 PM
Thanks Planoie, from reading your other posts in these forums you seem very knowledgable and I was hoping you'd see my question - consider yourself trapped in my twisted world for a few hundred posts! LOL ;) Please endulge me a bit longer...

Anyway so what you are saying is that "Remoting" is not actually what I need, but to use a web service as the intermediary piece of the puzzle. From what I have read all roads seem to point to remoting but now as I think about it, remoting is not necessary, I don't think.

I did a test earlier and I can instantiate a webservice from the vb app and call it's functions no problem - the question I have really, should the asp.net portion and the vb.net portion be calling the same webservice object? How would I store the data in the WS object and trigger the vb exe to know when something was received. Can I hook the vb portion into some event from the web service? I am a little fuzzy on this part. Technically the vb server portion is not looking to push any data out to the IE browser, the other way round, the ie browsers are pushing the data to the vb exe via a web service - right? (I do however want to make a push server but that is another project entirely)

Any further insights into my middle piece of the puzzle is greatly appreciated - my eyes are bleeding and i have not slept (much).
thanks again
Reply By: planoie Reply Date: 11/18/2003 11:00:07 AM
I have not worked with remoting.  You might want to investigate further.

What I am describing is basically more like two "pull" applications.  You have your web app which could run adjacent to the webservice (both in the same ASP.net project/application).  Then you have the VB.net windows app which "pulls" from the web service.  You could have the ASP.Net app interface with the webservice, but that's not necessary, especially if it's residing in the same project as the webservice.  There's little reason to include the extra middleman of the webservice if you can access the data directly.  This is what I'm picturing:

+ - - - - - - - - - - +
    Web Application
|                     |
    +---------------+      +---------------+
|   |   ASP Pages   | |    |  Web Browser  |
  +-|               |<-----|               |
| | +---------------+ |    +---------------+
  |
| |                   |
  | +---------------+      +---------------+
| | |  Web service  | |    |  VB.Net App   |
  +-|     pages     |<-----|               |
| | +---------------+ |    +---------------+
  |
+ | - - - - - - - - - +
  |
  |   +------------+
  |   |  Database  |
  +-->|   Server   |
      +------------+

Using this model, you need to have the VB app poll the webservice for changes at some regular time period.  This is how I would do it if I were building this type of setup that ran over the internet.  However, this wouldn't be ideal if you are going to be running all of this in the same network.  In that case you might be able to use remoting for a more affective system.  I don't know much about remoting, and I don't hear a whole lot on these forums about it.

Peter
------------------------------------------------------
Work smarter, not harder.
Reply By: Tek4VB Reply Date: 11/18/2003 12:43:45 PM
Yes, you have laid out my exact scenario. I have thought of the polling thing but I really don't want to go that route, and after doing some tests a little while ago, the webservices thing doesn't suit my needs either - I definitely have to use remoting but I am having a hard time finding the correct examples of what i am trying to do. I have to find a way to marshal the traffic entering IIS and redirect it to my VB Server portion, once the data is there I am good - then I can push responses back to the clients letting them know either the data went through ok or there was a bank or print error.

Thanks for your time - I will continue looking. if I find/devise a solution i will post it back up here. May take some time though.
Best regards,
James
Reply By: Tek4VB Reply Date: 11/18/2003 3:45:23 PM
Just went to Barnes and Noble looking for "Advanced .NET Remoting in VB.NET", by Ingo Rammer July 2002 but they didn't stock it. Guess I will order it.
Reply By: Tek4VB Reply Date: 11/19/2003 8:59:59 AM
In case anyone is interested, if you go to IngoRammer.com he has the VB.NET code samples from the book on his site as a zipped download. It's worth a look and they run out of the box, but I still find I need the book which hopefully I will be able to find today.

Go to topic 6690

Return to index page 1002
Return to index page 1001
Return to index page 1000
Return to index page 999
Return to index page 998
Return to index page 997
Return to index page 996
Return to index page 995
Return to index page 994
Return to index page 993