J
jman
I have an urgent question.
I have written a .Net C# windows services that has only
one key purpose: to move files from the machine that is
running the service to a network download server for
company distribution of data. When I try to call the
FileInfo.MoveTo() method, I receive the following error:
System.UnauthorizedAccessException: Access to the path is
denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String
str)
at System.IO.__Error.WinIOError()
at System.IO.FileInfo.MoveTo(String destFileName)
at FileDownloadService.Service1.timer1_Elapsed_1(Object
sender, ElapsedEventArgs e) in c:\uhaul .net
solutions\filedownload\filedownloadservice\service1.cs:line
194
I have mapped a drive to our network server and am trying
to move the files to it and am getting an Access error.
Is there a way to specify user credentials for the server
that you are trying to move files to? In other words, can
I move files to a network server by using the server's
friendly name (UNC) and provide user name/password for
authentication purposes? Any help would be greatly
appreciated!!
Thanks,
jman
I have written a .Net C# windows services that has only
one key purpose: to move files from the machine that is
running the service to a network download server for
company distribution of data. When I try to call the
FileInfo.MoveTo() method, I receive the following error:
System.UnauthorizedAccessException: Access to the path is
denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String
str)
at System.IO.__Error.WinIOError()
at System.IO.FileInfo.MoveTo(String destFileName)
at FileDownloadService.Service1.timer1_Elapsed_1(Object
sender, ElapsedEventArgs e) in c:\uhaul .net
solutions\filedownload\filedownloadservice\service1.cs:line
194
I have mapped a drive to our network server and am trying
to move the files to it and am getting an Access error.
Is there a way to specify user credentials for the server
that you are trying to move files to? In other words, can
I move files to a network server by using the server's
friendly name (UNC) and provide user name/password for
authentication purposes? Any help would be greatly
appreciated!!
Thanks,
jman