By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,589 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

Windows Service and Remoting

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a

"Tom Simpson" <to*@nospam.com> escreveu na mensagem
news:Oq**************@tk2msftngp13.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

P: n/a
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**************@tk2msftngp13.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 discussion thread is closed

Replies have been disabled for this discussion.