I have a VB.net (.net 2003) windows service which includes in it a C# .dll. This dll has a variety of responsibilites, among which is to copy a file from one machine to another. The code works perfectly except for the line of code which does the copying:
I am using the System.IO.File object to do the copying. At the top of the dll, I have the "directive": using System.IO; The error I am getting is: Cannot find file... but the file IS there. I wrote a quick sample windows forms application to copy the file, and it works fine. The windows service is running on the target machine, and the source file is sitting on another machine. Both are on their own private network. I am specifying the source path by using UNC: \\10.1.1.1\SourceFolder\fileName. Both machines have the same user account, for ease of accessibility, the source folder is shared, and I have gone through the sharing and security permissioning to make sure everything is right. Could this have something to do with the fact that I am trying to copy files from within a running windows service?? Do I need to add the Network Service user to something?
This is very high priority for me - I have a deliverable tomorrow. Hardware is being shipped out!
Any help would be appreciated. Thanks.