
Question:
I have an FTP Server outside of the domain (In a workgroup). I need to move files using an application called by the FTP client on the FTP server to a share within the domain using VB.net:
(System.IO.File.Move(SourcePath & Filename, TargetPath & Filename))
Impersonation will not work neither will mapping a drive (As no user will be logged on) This is a console application that takes the above parameters.
Any suggestions?
Thanks.
Answer1:You might be able to use <a href="http://msdn.microsoft.com/en-us/library/aa370645%28VS.85%29.aspx" rel="nofollow">NetUseAdd</a>. Here's a CodeProject article that describes how to use it for something similar to your requirements at least: <a href="http://www.codeproject.com/KB/IP/ConnectUNCPathCredentials.aspx" rel="nofollow">Connect to a UNC Path with Credentials</a>