F
Frank Rizzo
I try to open a file using this line:
FileStream oStream = File.Open(FileName, FileMode.Open,
FileAccess.Write, FileShare.None);
When I try to open a file "\\CON-GELBR\TRAFFIC_LOAD\01012605.trf", I am
getting the following error:
System.UnauthorizedAccessException: Access to the path
"\\CON-GELBR\TRAFFIC_LOAD\01012605.trf" is denied.
I can open the file using Notepad. Does the File.Open method not work
with UNC paths? Or am I missing something stupid?
If File.Open does not work with UNC paths, what's my alternative?
I am doing this from a WinForm exe.
Thanks
FileStream oStream = File.Open(FileName, FileMode.Open,
FileAccess.Write, FileShare.None);
When I try to open a file "\\CON-GELBR\TRAFFIC_LOAD\01012605.trf", I am
getting the following error:
System.UnauthorizedAccessException: Access to the path
"\\CON-GELBR\TRAFFIC_LOAD\01012605.trf" is denied.
I can open the file using Notepad. Does the File.Open method not work
with UNC paths? Or am I missing something stupid?
If File.Open does not work with UNC paths, what's my alternative?
I am doing this from a WinForm exe.
Thanks