B
Bill Young via .NET 247
I'm having all sorts of problems trying to move a file across the network using the File.Move command with a computer on the network. I have tried doing it with \\<server>\<share> and I tried mapping a drive but I still get the same error.
System.UnauthorizedAccessException: Access to the path "M:\home.wav" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.Move(String sourceFileName, String destFileName)
at WatchFolder.Form1.ProtectandServe(String fp) in c:\files\c#\vmwatcher\form1.cs:line 147
line 147 is
File.Move(fp,sp);
where fp =c:\wavs\home.wav
and
sp = m:\home.wav or
\\w2k3\messages\home.wav
System.UnauthorizedAccessException: Access to the path "M:\home.wav" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.Move(String sourceFileName, String destFileName)
at WatchFolder.Form1.ProtectandServe(String fp) in c:\files\c#\vmwatcher\form1.cs:line 147
line 147 is
File.Move(fp,sp);
where fp =c:\wavs\home.wav
and
sp = m:\home.wav or
\\w2k3\messages\home.wav