Hi,

I have an issue that been bugging me for a while now.
I need to copy files from Computer A (Domain/Workgroup A) to Computer B (Domain/Workgroup B).

Computer A and Computer B are in different domains/workgroups.
They can be on the same network, or Computer B can be on a network accessed via a VPN.
Authentication for Computer B is required.
I cannot add Computer A to the safe list in Domain B...simply due to extremely tight security, which means that impersonation is not an option.

I have looked at the following:

System.IO.File.Copy - I can't find a method to pass username and password for authentication to this.
XCopy - Same issue as File.Copy
WMI - I always get an error code of 9 returned, which is irritating, and cannot get this to work.
WNetAddConnection2W - Used this to setup a mapped network drive...I can then use File.Copy and then remove mapped drive. This works when connecting to a domain on my network...but when connecting to a PC on a network at the end of a VPN I get an error saying that 2 resources to the same network with diff credentials isnt allowed. I think this is because my VPN creds are diff to the Auth creds I need to connect to the svr with.

This is driving me nuts, can anyone point me in the right direction. I feel silly.

Cheers,

Woka

Anyone got any pointers.