VBAHole22 Posted October 1, 2004 Posted October 1, 2004 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? Quote Wanna-Be C# Superstar
Administrators PlausiblyDamp Posted October 2, 2004 Administrators Posted October 2, 2004 How did you configure it to run as your user account - not sure what you meant by I hard coded my pass and username in. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
VBAHole22 Posted October 2, 2004 Author Posted October 2, 2004 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. Quote Wanna-Be C# Superstar
VBAHole22 Posted October 4, 2004 Author Posted October 4, 2004 Can anyone else confirm this behavior with a simple File.Exists on a network (domain) resource from a Windows Service set up as User? Quote Wanna-Be C# Superstar
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.