G
Guest
\\MyRemoteServer\F1\F2\F3\This PDF.pdf is accessible thought my IE browser,
so my user has access there.
However the following code gives "Logon failure: unknown user name or bad
password.\r\n"
I need to get this application run under a user that has access to
MyRemoteServer, how should I do this?
void dDialog(string sPath)
{
sPath="\\\\MyRemoteServer\\F1\\F2\\F3\\This PDF.pdf";
System.IO.FileInfo oFile;
try
{
oFile = new System.IO.FileInfo(sPath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" +
oFile.Name);
Response.AddHeader("Content-Length", oFile.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(oFile.FullName);
}
catch (Exception ex)
{
Response.Write("Exception: " + ex.Message);
}
finally
{
Response.End();
}
}
so my user has access there.
However the following code gives "Logon failure: unknown user name or bad
password.\r\n"
I need to get this application run under a user that has access to
MyRemoteServer, how should I do this?
void dDialog(string sPath)
{
sPath="\\\\MyRemoteServer\\F1\\F2\\F3\\This PDF.pdf";
System.IO.FileInfo oFile;
try
{
oFile = new System.IO.FileInfo(sPath);
Response.Clear();
Response.AddHeader("Content-Disposition", "attachment; filename=" +
oFile.Name);
Response.AddHeader("Content-Length", oFile.Length.ToString());
Response.ContentType = "application/octet-stream";
Response.WriteFile(oFile.FullName);
}
catch (Exception ex)
{
Response.Write("Exception: " + ex.Message);
}
finally
{
Response.End();
}
}