PC Review


Reply
Thread Tools Rate Thread

Copying a file to a network share, take 2

 
 
Frank Rizzo
Guest
Posts: n/a
 
      26th Oct 2004
Hello, my app needs to copy a file on a network share. The network
share is accessible via a domain ID, which has all possible folder
rights assigned to it. 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:

Dim sSource As String =
"\\nasrv88c3\modeldev$\modeldev\apps\web_inv\stmtstemp\MBS
Staging\ObjectList2.zip"
Dim sTarget As String =
"\\nasrv88c3\modeldev$\modeldev\apps\web_inv\stmtstemp\MBS
Staging\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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
0x800705AA While copying file form network share? =?Utf-8?B?UmFtcnVubmVy?= Windows Vista Networking 0 30th Apr 2007 02:22 PM
Dragging Messages to Network Share (Error Copying file or folder) =?Utf-8?B?S3Jpcy5GdWxnaGFt?= Microsoft Outlook Discussion 0 16th Aug 2005 01:58 AM
Copying a file to a network share Frank Rizzo Microsoft C# .NET 7 29th Oct 2004 05:05 AM
Copying a file to a network share Frank Rizzo Microsoft VB .NET 2 26th Oct 2004 05:00 AM
copying outlook to network share Charlotte Microsoft Outlook Discussion 1 15th Aug 2003 12:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:22 AM.