views:

30

answers:

1

I created a wcf service hosted in windows service manager on windows XP sp3, and this service shall generates some file on shared drive/folder on remote PC.

but when i try to give shared path as "\Server\SharedFolder" it gives Access Denied error and when i Map this drive as "Z:" it gives "Could not find a part of the path 'Z:\R1_18062010_085324.csv'" this error,

Both client PC and Remote PC are in same domain and havine windows XP sp3, and i added same user to the shared folder in which account service is running.

Please suggest the solution,

A: 

In general if your service must access a network it should not run under "Local Service" account. If the service run under a domain account you should give for the Share and for File System permission for the account (read or change for example). If the service run on computer COMPUTER1 under "Local System" or "Network Service" account, you should grand permission for the computer account (DOMAIN\COMPUTER1$).

Oleg
My domain user account is JRA and service is running in [email protected] i.e. my domain
Jaswant Agarwal
Then you should only verify, that [email protected] account has access to `\\Server\SharedFolder\R1_18062010_085324.csv` (both share and file system). To be sure you can login with the account interactively and try to access the file. You will see where you have problem of the share level (`\\Server\SharedFolder`) or in a file system.
Oleg
Oleg, i verifed this also, this account has access of both but still getting same problem
Jaswant Agarwal
If you use a user account for a windows service there are no difference between interactive access of file on the network and an access from windows service. You should verify one more time all what you do inside of service. Probably you wrote in your question "what you want to do" and not "what you really do". Start a Windows Service, connect to the windows service from the Visual Studio and debug the code fragment where you have the problem. Just verify everything all one more time inside the debugger. Usage of z: is of cause not permitted.
Oleg