Solved

Need to create a service I can talk to

Posted on 2006-11-21
8
234 Views
Last Modified: 2010-04-23
I need to create a service in VB.Net that I can interact with.

We need to have a service running on a server and we need to be able to modify it's behavior.  In particular, we're going to have the service start-stop slave processes when we tell it to.

We really want to do this remotely, so we'll eventually wrap this with a web front-end (I imagine).  In the meantime, we don't know of a good way to talking to this process in the first place.  We'd like to start with a test app, that we can command and just have it generate a test file out that verifies it got the message.

How would you do this (short of having it poll for a command file or something)?
0
Comment
Question by:klamerus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 13

Accepted Solution

by:
newyuppie earned 500 total points
ID: 17986716
in the 101 vb samples from MSDN there is one example called "Advanced Remoting - How to TCP Remoting". i think that's what you are looking for

http://www.microsoft.com/downloads/details.aspx?familyid=08e3d5f8-033d-420b-a3b1-3074505c03f3&displaylang=en
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17986898
If all you need to do is administer other services, I think you need to look into web services or ASP as apposed to tcp remoting.
It would be allot simpler. The WS/ASP page could handle all the starting and stopping of other services.

First thing, look into creating an module to start/stop local/remote services (on the same network internally).
Secondly, create a web service or asp page, that can access the above module to start/stop services.

As newyuppie stated ealrier, there are loads of examples to use on the web so I won't pass any code here.
But I think if you start with the 2 modules above you won't go wrong.
0
 
LVL 1

Author Comment

by:klamerus
ID: 17987254
I'm thinking remoting might be what I need.

What I want to remotely manage is not other services.  The working processes I'm talking about would be a set of threads.  Each of these threads performs work.  We want to be able to tell the "control" process (the windows service) to start additional worker threads if things are getting behind, or to remove threads or even pause work temporarily (while we do something on another system).

So, we need a windows service (written in .Net, preferably VB.NET), that will manage these threads.  We want to be able to tell that master process to add/remove working threads when we think more processing is needed.

We want to do this from a desktop to start.  Right now we need to log on to the server to start and stop processes manually.  That introduces risk.

Mark
0
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 1

Author Comment

by:klamerus
ID: 17987304
Maybe I don't even need "real" remoting.  If the master windows service can listen to a TCP/IP port as well and we can have it response to requests on that while it's controlling the other applications, then we could send it commands.

Is this possible?
0
 
LVL 10

Expert Comment

by:Kinger247
ID: 17987351
That is possible.
when you talk of remote access (to make sure we're on the same page) your talking about via the internet ?  or just another machine ?
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17987878
there are as you may have noticed several methods. if you would like to listen on a defined port and send commands to it, its a perfectly good approach. the example you need is in the link i provided as well, and its called: "Advanced .NET Framework (Networking) - Use Sockets"

the example is simple enough and if you modify a bit you could even use that one.
0
 
LVL 1

Author Comment

by:klamerus
ID: 17992421
Excellent.  Anyway advice on which is preferred over the other?  Are there advantages one way vs. another?
0
 
LVL 13

Expert Comment

by:newyuppie
ID: 17992943
remoting seems a little harder at first glance, but they both can do the job. as for advantages of one way over the other, someone correct me if im wrong but i guess the new remoting classes in 2.0 are capable of more security in the transmission of data.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

623 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