Windows Service
-
I've created a service that updates the components of several of my applications from a central file share on my network. The service is running with the localsystem account. An exception occurs when the service attempts to connect to the file share. The share contains the components that I copy to the local computer to update an application. I think the problem lies in the way the service connects to the shared folder. It uses the local computer's credentials when it connects, I think. Is there any way that the service can connect to the specified file share using the current user's credentials?
-
I've created a service that updates the components of several of my applications from a central file share on my network. The service is running with the localsystem account. An exception occurs when the service attempts to connect to the file share. The share contains the components that I copy to the local computer to update an application. I think the problem lies in the way the service connects to the shared folder. It uses the local computer's credentials when it connects, I think. Is there any way that the service can connect to the specified file share using the current user's credentials?
Services run all the time, even when there is no user logged in. A better solution would be to allocate a domain account for the service to use that has the relevant access.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
-
I've created a service that updates the components of several of my applications from a central file share on my network. The service is running with the localsystem account. An exception occurs when the service attempts to connect to the file share. The share contains the components that I copy to the local computer to update an application. I think the problem lies in the way the service connects to the shared folder. It uses the local computer's credentials when it connects, I think. Is there any way that the service can connect to the specified file share using the current user's credentials?
Like Colin said, you'll have to create an account that has rights to both the local machine for updating the components AND rights to the server share. The local system account does NOT have any rights to any network resources. Go into the Service manager and change the account that your service is running under to use this account. Using the currently logged in users account is not a good idea... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome