473,545 Members | 2,025 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Windows Service and Remoting

I have set up a Windows service in VB.NET, and created a
'Service Manager' Windows Forms app that can 'get'
information from that service. The service consists of the
basic service 'framework' along with a large class that I
wrote that actually does all the work. The Service Manager
app uses .NET remoting to get info into/back from the
service.

I have a couple of questions that I need info on before I
complete this service:

1. When you do a Stop and Start, does the service actually
get unloaded out of memory then reloaded back in? From what
I understood, a service get 'loaded' when the
server/computer starts up, and then is 'started' when the
Start command is issued. However, I saw some comments out
there that seemed to say the service actually gets unloaded
from memory when STOP is called.

2. Is there a way I can tap into when the service actually
first gets loaded? The reason I ask is that I would like to
be able to instantiate my base class object and turn on
remoting at this time. That way, even if the class starts
up as 'Stopped' my service manager app can still get info
back from the service itself. Then the Start command can
actually just start up the timer and do whatever it needs
to do.

Thanks!

Tom

--

Nov 21 '05 #1
2 1806

"Tom Simpson" <to*@nospam.com > escreveu na mensagem
news:Oq******** ******@tk2msftn gp13.phx.gbl...
I have set up a Windows service in VB.NET, and created a
'Service Manager' Windows Forms app that can 'get'
information from that service. The service consists of the
basic service 'framework' along with a large class that I
wrote that actually does all the work. The Service Manager
app uses .NET remoting to get info into/back from the
service.

I have a couple of questions that I need info on before I
complete this service:

1. When you do a Stop and Start, does the service actually
get unloaded out of memory then reloaded back in? From what
I understood, a service get 'loaded' when the
server/computer starts up, and then is 'started' when the
Start command is issued. However, I saw some comments out
there that seemed to say the service actually gets unloaded
from memory when STOP is called.

2. Is there a way I can tap into when the service actually
first gets loaded? The reason I ask is that I would like to
be able to instantiate my base class object and turn on
remoting at this time. That way, even if the class starts
up as 'Stopped' my service manager app can still get info
back from the service itself. Then the Start command can
actually just start up the timer and do whatever it needs
to do.

Thanks!

Tom

--
Nov 21 '05 #2
Tom:

About your question 1, the service is totally unloaded when you set it to
stopped. It is a executable with some "tracks" where the system can
recognize as a service, what is executed when your click Start button.

The question 1 responds your question 2, already. :-P If the service is
not running and not loaded, your cannot do any taks on your service. The
stuff that is come nearest what you want is the Pause option of the service.

[]s
Cesar


"Tom Simpson" <to*@nospam.com > escreveu na mensagem
news:Oq******** ******@tk2msftn gp13.phx.gbl...
I have set up a Windows service in VB.NET, and created a
'Service Manager' Windows Forms app that can 'get'
information from that service. The service consists of the
basic service 'framework' along with a large class that I
wrote that actually does all the work. The Service Manager
app uses .NET remoting to get info into/back from the
service.

I have a couple of questions that I need info on before I
complete this service:

1. When you do a Stop and Start, does the service actually
get unloaded out of memory then reloaded back in? From what
I understood, a service get 'loaded' when the
server/computer starts up, and then is 'started' when the
Start command is issued. However, I saw some comments out
there that seemed to say the service actually gets unloaded
from memory when STOP is called.

2. Is there a way I can tap into when the service actually
first gets loaded? The reason I ask is that I would like to
be able to instantiate my base class object and turn on
remoting at this time. That way, even if the class starts
up as 'Stopped' my service manager app can still get info
back from the service itself. Then the Start command can
actually just start up the timer and do whatever it needs
to do.

Thanks!

Tom

--
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2243
by: Michael Riggio | last post by:
Is there a way to have a windows service instantiate a class that is a web service, which will then be accessible to clients via HTTP? Thanks, -Mike
2
7268
by: Fadi | last post by:
Backround: I am trying to figure out how to do the equivalant of a classic COM Local Server Singleton in .NET/C#. I created a coupld of simple Class Libs that exposes public interfaces and hosted them in a Windows Forms EXE. Create a Windows Forms client and both the Client and the Host EXEs configure the remoting protocols through...
20
383
by: Moty Michaely | last post by:
Hello, Can anyone please help me finding a good way to develop a c# winforms application client for a pre-developed windows service? Should I use wse2 with tcp protocol? Bu I still have win98 clients. mmm.. Please help. Thanks, Moty.
2
1368
by: Stephajn Craig | last post by:
Is it possible to apply remoting techniques to a Windows Service Application? I have an application that I'm building that is primarily ASP.NET based. However, there are some functions that I want to have run all the time in the background. So I am implementing a Windows service to accomplish this. However, I'd like to expose some...
3
4460
by: Rob | last post by:
Can a form be opened from a Windows service? I have a windows service that I would like to open a form from a notify icon. I cannot get the Notify Icon to display nor can I open a form. Any help would be greatly appreciated. Rob
3
4785
by: Steve Amey | last post by:
Hi all Is it possible to retrieve data from a Windows Service? Let's say I have a service that contains code in the OnStart method that creates a DataSet, from a client application I'm using a ServiceController to check that the Service on the specified machine is running, can I get the DataSet that is held within the Service? Is it...
2
6880
by: deko | last post by:
When to use a privileged user thread rather than a windows service? That's the question raised in a previous post . It was suggested that if the service needs to interact with a WinForms app (which is the UI used to adjust the actions taken by, and the schedule of the service), then a privileged user thread should be used in the UI - no...
0
1112
by: Jason | last post by:
Ok, for the life of me, I just don't understand what's going on. I want to use remoting to send messages from a windows service to a windows form app, but I just can't get it to work. So, here's what I have so far. I created a small, remotable object that inherits from MarshalByRefObject. It has a public subroutine that raises an event...
3
1547
by: rkausch | last post by:
Hello, I'm performing some research to determine the feasibility of developing a Windows Service (see http://en.wikipedia.org/wiki/Windows_Service for the specific definition of "service" to which I'm referring) to perform a particular task. I'm having some trouble determining if a service's functionality can be accessed in a non-I/O manner...
2
4470
by: =?Utf-8?B?dmlzaHJ1dGg=?= | last post by:
Hi, I have 2 applications running, one Windows application project and the other windows services project. I want to call my Windows application in my windows services. I want to run them as seperate process. If my windows application starts running,only if it completes fully, then my windows services should continue its execution. My...
0
7479
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7411
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7669
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7926
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7439
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5987
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
4962
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1901
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1028
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.