Re: Could not find a part of the
- From: T.Jeywin Lizy <TJeywinLizy@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 17 Dec 2008 22:44:04 -0800
Please let me know how should this be done :
impersonate some domain-user that *can*
access that share *and* use the UNC path (\\server\share) to access it.
My problem:
When trying to read the file the user selects in PDA it gives an error
message
DirectoryNotFoundException:could not find a part of the path.(The same code
works fine in my system and diff remote servers)
My Code:
Stream a = ReadStream(txtFilePath.Text);
Label1.Text = a.Length.ToString();
_______________________
using System.Security.Permissions;
[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum, Name =
"FullTrust")]
namespace FileBus
{
public Stream ReadStream(string pathSource)
{
FileStream f = new FileStream(pathSource, FileMode.Open,
FileAccess.Read);
Stream a = (Stream)f;
return a;
}
}
Please help.
T.Jeywin Lizy
"Hans Kesting" wrote:
.While trying to create new File, i recieve the following error=
message: "System.IO.DirectoryNotFoundException: Could not find a part of the
= path=20 "Y:\Reports.pdf ". The Y: is shared folder of another system and it
maped to the local system. The path exists.
The Y: mapping is for *your* account, which is not the account the
website runs under. Moreover, this ASPNET account is a local account
with limited priviledges. It can not access the network for example.
You might need to van the site impersonate some domain-user that *can*
access that share *and* use the UNC path (\\server\share) to access it.
Hans Kesting
- Prev by Date: Explain about lack of orthogonality?
- Next by Date: how to do expandable / collapsable sections
- Previous by thread: Explain about lack of orthogonality?
- Next by thread: how to do expandable / collapsable sections
- Index(es):
Relevant Pages
|