Solved

Need to create a service I can talk to

Posted on 2006-11-21
8
199 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 13

Accepted Solution

by:
newyuppie earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
 
LVL 1

Author Comment

by:klamerus
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 10

Expert Comment

by:Kinger247
Comment Utility
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
Comment Utility
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
Comment Utility
Excellent.  Anyway advice on which is preferred over the other?  Are there advantages one way vs. another?
0
 
LVL 13

Expert Comment

by:newyuppie
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now