G
Guest
Hi,
This is my first coding experience with Windows Service. I have a Windows
Service that connects to remote drives using UNC paths (no drive letters). I
make the connection with the remote drive in my OnStart procedure. I run the
service with my username so that the service can have enough privelege to do
its job. My questions are:
1. What happens to the connections when I log off? I understand that
service runs in the background. Will it maintain the UNC connection when no
one is logged on?
2. What happens when someone other than me logged on to the computer? Will
it invoke my OnStart procedure again (and therefore try to make the UNC
connection again)? My log shows the service invokes the OnStart procedure
everytime someone is logged on, but never runs the OnStop procedure when that
person logs off.
Thanks for the help.
This is my first coding experience with Windows Service. I have a Windows
Service that connects to remote drives using UNC paths (no drive letters). I
make the connection with the remote drive in my OnStart procedure. I run the
service with my username so that the service can have enough privelege to do
its job. My questions are:
1. What happens to the connections when I log off? I understand that
service runs in the background. Will it maintain the UNC connection when no
one is logged on?
2. What happens when someone other than me logged on to the computer? Will
it invoke my OnStart procedure again (and therefore try to make the UNC
connection again)? My log shows the service invokes the OnStart procedure
everytime someone is logged on, but never runs the OnStop procedure when that
person logs off.
Thanks for the help.