BrianEwens

How do I create a Windows Service that can access files on the network Right now the service is logged on as "Local System" and cannot access network folders or files.

Re: Architecture General Windows Service can't access files on the network

erikj

You probably need to change the account the service runs under to either (a) a specific domain account that has access to file share or (b) to "network service" which runs ander a pre-defined privilege level. Alternatively, you can store the username and password of a domain account in some sort of (hopefully secure) config file and then impersonate that user when you need to access the file share. You might also be able to get to the shared files if you allow access to "everyone", but that is probably not desirable.




Re: Architecture General Windows Service can't access files on the network

Clemens Reijnen

The service is running in a Internet-zone this zone hasn't got the rights to access your file system. To get this right configure the policy level of you service to run in a other zone.

for information: Security Policy Management

And if you really want to figure/out this kind of security things take a look how sharepoint has organized it... interesting learning






Re: Architecture General Windows Service can't access files on the network

BrianEwens

Thanks for your help Erik. I changes the service to impersonate and it works now.



Re: Architecture General Windows Service can't access files on the network

code seeker

Hi,
How do I do that that is impersonate another user and read the config file I'm assuming that the "run as" feature is different than impersonation that is being referred to in this thread.

Thanks