Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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?

Wanna-Be C# Superstar
Posted

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.

Wanna-Be C# Superstar

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...