Windows Service needs network resources

gotnetdude

Active member
Joined
Jan 24, 2008
Messages
27
Programming Experience
10+
I have a windows service application that needs to read an MS Access database on a remote workstation. I mapped a drive on my development workstation to the remote share folder containing the Access database with a domain user id. I'm running into a permission issue, and could use some help with the setup. I know the codes good, becease I have it working in a console program I wrote. I created an xsd which I’m using to fill a datatable from the Access DB. The query works fine when I preview it in design mode, but it fails when the service executes the fill. When I created the service I gave it an account type of local and switched over it over to network services account, but this didn't work either. Should I be using Network Service? How do I get the windows service to use network shared resources.
 
The service is not getting the mapped drive. It's in a totally different session than the logged on user.

Why don't you just start the service with the account that you're using to map the drive?
 
RockSteady,

I ended up getting the network services account to work and never retested to see if the same resolution would have resolved the problem when using the user account, but I suspect it would have. The one thing of special interest that I had to do to get the network service account to start was give my bin\debug folder where I had the service exe run from network services privileges. As long and I had the permissions and security setup after that everything worked fine.
 
Back
Top