473,320 Members | 1,930 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 1789

"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
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
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...
20
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...
2
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...
3
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...
3
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...
2
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...
0
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...
3
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...
2
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.