Pesky windows service security issue

VBAHole22

Contributor
Joined
Oct 21, 2003
Messages
432
Location
VA
I have written a windows service that needs access to resources on my network. Unfortunately I can't seem to configure it to recognize a network file. I am testing this using File.Exists(path) from an asp.net page that calls the service and it doesn't find the file at that path.
I realize that a win service runs under the Local System account. I tried to set it up to run under my user account but I still can't get access to the files. I hard coded my pass and username in and no luck.
I see that there is another option to run under Network account but I am running win2k and that says xp only. It says the network account passes credentials on when it makes network requests. Shouldn't the user account do this as well?
 
Yeah,
I set it up as user.

If you don't give it an account it will prompt you for the user and pass when you run the install, but you can hardcode it in the installer vb class. That was what I was refering to.
When I read the docs on this I got the impression that although you are using a user account that should have the same privleges as that user that for some reason this didn't apply to accessing network resources. That somehow you needed to use the NetworkService if you wanted to "pass along credentials during network requests". But you need XP for that. Well I guess that implies that using the user account is only pertinent to the resources that user has access to locally despite that as the user I am running I can access network resources elsewhere, like in explorer. It's confusing.
 
Can anyone else confirm this behavior with a simple File.Exists on a network (domain) resource from a Windows Service set up as User?
 
Back
Top