Hi,
I want to copy files from one network path to another network path through windows serivce.
I
am impersonating the user but it works only for one network path at a
time. If I try to impersonate another user the first one becomes
invalid.
Is there a way through which we can impersonate two users simulateneously.
I
know other way is that I copy file from source network path to local
system and then copy it from local system to destination network path
i.e impersonating one user at a time but there are other things in my
code which will make this too complicated.
I would really appreciate if anybody can help me on this.
Regards,
Rahul Rastogi
Loading
David JohnsonPosted Jun 26, 2008, 11:07 PM
You can fix this with one of several solutions
Have your Sys Admin set up a service user and have them ONLY grant access to the two paths so domain\ServiceUser has access to \\Server1\share and \\Server2\share then run the service as that user
Second you can run the service as Local System Account and grant the machine access to both paths
Third Have the Service run on Server1 and use a filesystemwatcher to activate the service and then you ONLY have to grant access to server 2
FileSystemWatcher MUST run on the server it is monitoring to run successfully and reliabley
These are just a couple of the ways to Fix this
Scott LyslePosted Jun 22, 2008, 11:58 AM