Hello, I've asked this question in the languages.vb group, but got no
response, so I'll try my luck here.
My app needs to copy a file from a local folder to a network share. The
network share is accessible via a domain ID, which has all possible
folder rights assigned to it. The domain ID also has full rights to the
local folder. I am using the impersonation code from here
http://msdn.microsoft.com/library/de...asp?frame=true
The code seems to properly impersonate (as evidenced by debug
statements), however, when I do this:
string sSource = @"c:\temp\ObjectList.zip";
string sTarget = @"\\nasrv88c3\modeldev$\modeldev\apps\\ObjectList. zip"
Try
File.Copy(sSource, sTarget)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
It fails with "System.Io.FileNotFoundException: Could not find the
file..." I know for sure that the file is there. Do I first perhaps
have to log on to the share? If so, are there any examples out there?
What am I missing in general?
Thank you