Search:
Namespaces
Discussions
.NET v1.1
Feedback
WebService as part of Larger App
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngwebservices' list
.
Bob Macleod
I need to have an app that is basically a "windows app" but that needs to be
able to "listen" for an associated application running on any of a number of
other machines (on the same LAN) making requests to have an activity
initiated.
I figured a webservice would be perfect for that job. What I can't seem to
figure out is how to create a VB "Solution" project that has a windows app
"parenting" a webservice.
Here's my vision: I want the main application to start up, then set up the
"listening" webservice component as its child (so it can receive events from
the webservice). When the webservice gets a request from another computer on
the network, it raises an event to the parent app, which performs the
requested activity.
Thanks for any advice you can give me on this!
Bob
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
Reply to this message...
Sreedhar Koganti
If I am clear about your question...
It's better to use windows services[Create using .Net], in that you can
refer web services, which are diployed in different machines.
so that win service listens automatically with the help of web services and
gets you the results of activites of other machines.
There may be other way.. I could think this is also one best way..
Cheers
Sreedhar
http://www.w3coder.com
[Original message clipped]
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.
Reply to this message...
Simon Fell
On Tue, 11 Jun 2002 15:29:22 -0700, in asp-ml you wrote:
>I need to have an app that is basically a "windows app" but that needs =
to be=20
>able to "listen" for an associated application running on any of a =
number of=20
[Original message clipped]
You can do this pretty easily with remoting, your app can host a
remoting SOAP/HTTP listener with just a few lines of code. see some of
the remoting samples in the quick start.
Cheers
Simon
Reply to this message...
Liz
Simon might have already said something similar, but it seems you could
integrate a TCP/IP listener in your "main app" .. listening, let's say on
port 55000 ... that's that; the Win app is doing whatever it is doing and
simulltaneously awaiting connections ... next you create a web service
independently which -- perhaps among other things -- "talks" to your
listener back on port 55000 at IP address nnn.nnn.nnn.nnn. Hopefully, your
listener gets the message from the web service and then proceeds to do
whatever it needs to do in your design ... maybe it displays a graphic of
the number of people who connected to your web service to get the current
temperature in Peoria .... whatever ....
So ... unless I've totally missed your point, I don't see any reason for
the Windows app to "parent" the web service ... on the other hand, reading
your first paragraph, why not have the "associated application" communicate
directly with the main Windows app ... it's not clear what the web service
is doing for you ...
"Bob Macleod" <
Click here to reveal e-mail address
> wrote in message
news:668480@aspngwebservices...
[Original message clipped]
Reply to this message...
Bob Macleod
Liz, I think you might be right when you said "why not have the 'associated
application' communicate directly with the main Windows app ...".
Perhaps you will be able to give me some direction in general terms if I
explain more fully what I am trying to accomplish.
I have my "server app" running on, let's say, a server. Mostly, it is a
standalone batch process type of app. But one of the things it needs to do
is to handle requests from other computers on the same LAN. For example, a
user needs to interact with functionality only available on the server app:
E.g. Connect, access functions, disconnect. I thought a webservice was the
way to go. In VB6 I know this would have involved either DCOM or SOAP. I put
the project on hold because DCOM might not work depending on how the LAN is
configured (routers, firewalls etc). I was thinking of studying SOAP to see
how to implement it, when .NET came along. I am a beginner with .NET, and
assumed that the only way for "client" computers to send "messages" to my
"server" app was by setting up a webservice on the server app. Since my
server app does many things and listening for messages is only one of them,
I thought I needed my server app to instantiate a webservice as a child, and
then when the webservice detected a client app asking for a connection, it
could raise an event to its parent the server app, at which point the server
app could interact with the client app (I guess via the webeservice) and
disconnect when done. Now your comment makes me think there might be a
simpler way.
Thanks for your thoughtful reply, looking forward to your further comments.
Bob
[Original message clipped]
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
Reply to this message...
The Lacey's
Here is the basic design pattern I think would work best, given the
description of your problem:
Create a Web Service that runs on the server that has your application
installed. It will communicate with your App via COM Interop; if your app
was written in VB, your have to instantiate a new instance of the root app
class (you can't access a running VB 6 COM component - their not placed in
the ROT - running object table). Expose methods on your Web Service to
establish a valid connection with your app (ie. Connect(Username, Password)
method) and disconnect. Retain the instance of the App in the IIS Session
space. Provide additional methods on the Web Service to expose the
functionality you need that your COM application provides.
On the Client side (those other application running on your LAN) you need to
add code that establishes a session with the Web Service, and maintain the
session cookie (this is important, Web Services are stateless by default,
and if you don't retain the session cookie your constantly starting up new
IIS sessions). If the client is also COM, I'd use the SOAP 2 Toolkit (or
SOAP 3 toolkit 3 beta if your adventurous).
Have fun.
Martin.
-----Original Message-----
From: Bob Macleod [mailto:
Click here to reveal e-mail address
]
Sent: July 2, 2002 10:22 AM
To: aspngwebservices
Cc:
Click here to reveal e-mail address
Subject: [aspngwebservices] Re:
WebService
as part of Larger App
Liz, I think you might be right when you said "why not have the 'associated
application' communicate directly with the main Windows app ...".
Perhaps you will be able to give me some direction in general terms if I
explain more fully what I am trying to accomplish.
I have my "server app" running on, let's say, a server. Mostly, it is a
standalone batch process type of app. But one of the things it needs to do
is to handle requests from other computers on the same LAN. For example, a
user needs to interact with functionality only available on the server app:
E.g. Connect, access functions, disconnect. I thought a webservice was the
way to go. In VB6 I know this would have involved either DCOM or SOAP. I put
the project on hold because DCOM might not work depending on how the LAN is
configured (routers, firewalls etc). I was thinking of studying SOAP to see
how to implement it, when .NET came along. I am a beginner with .NET, and
assumed that the only way for "client" computers to send "messages" to my
"server" app was by setting up a webservice on the server app. Since my
server app does many things and listening for messages is only one of them,
I thought I needed my server app to instantiate a webservice as a child, and
then when the webservice detected a client app asking for a connection, it
could raise an event to its parent the server app, at which point the server
app could interact with the client app (I guess via the webeservice) and
disconnect when done. Now your comment makes me think there might be a
simpler way.
Thanks for your thoughtful reply, looking forward to your further comments.
Bob
[Original message clipped]
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
| [aspngwebservices] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngwebservices.asp
= JOIN/QUIT
|
http://www.asplists.com/search
= SEARCH Archives
Reply to this message...
System.Web.Services.WebService
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com