R
rgw1
Hello,
Can anyone help with this?
I am using C# with IIS 6.0 on Windows 2003 Server. I am trying to copy
a file over the network. It is attempting to copy a file on a NAS
(external hard drive), which is Linux based. I have already set the
permission on the NAS and I can copy files manually without any
problem. If I run the same code on IIS 5.1 on Windows XP on the same
network, it works!
Here is the complete code:
<% @Page Language="C#" Debug="true" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
try
{
System.IO.File.Copy(@"\\Hd-land14\library\test.doc", @"\\Hd-
land14\library\test2.doc");
}
catch (Exception ex)
{
Response.Write(ex);
}
}
</script>
Here is the error:
System.IO.IOException: Logon Failure: unknown user name or bad
password. System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) System.IO.File.InternalCopy(String sourceFileName,
String destFileName, Boolean overwrite) System.IO.File.Copy(String
sourceFileName, String destFileName) ASP.test_aspx.Page_Load(Object
sender, EventArgs e) c:\Inetpub\wwwroot\test.aspx: line 49
Any information will appreciated.
Thanks!!
Can anyone help with this?
I am using C# with IIS 6.0 on Windows 2003 Server. I am trying to copy
a file over the network. It is attempting to copy a file on a NAS
(external hard drive), which is Linux based. I have already set the
permission on the NAS and I can copy files manually without any
problem. If I run the same code on IIS 5.1 on Windows XP on the same
network, it works!
Here is the complete code:
<% @Page Language="C#" Debug="true" %>
<script runat="server">
void Page_Load(object sender, EventArgs e)
{
try
{
System.IO.File.Copy(@"\\Hd-land14\library\test.doc", @"\\Hd-
land14\library\test2.doc");
}
catch (Exception ex)
{
Response.Write(ex);
}
}
</script>
Here is the error:
System.IO.IOException: Logon Failure: unknown user name or bad
password. System.IO.__Error.WinIOError(Int32 errorCode, String
maybeFullPath) System.IO.File.InternalCopy(String sourceFileName,
String destFileName, Boolean overwrite) System.IO.File.Copy(String
sourceFileName, String destFileName) ASP.test_aspx.Page_Load(Object
sender, EventArgs e) c:\Inetpub\wwwroot\test.aspx: line 49
Any information will appreciated.
Thanks!!