Ask a Question related to ASP.NET Security, Design and Development.
-
Steve #1
Could not find path error
Hi all,
I am referring to this article in MSDN :
[url]http://msdn.microsoft.com/library/en-us/secauthn/security/logonuser.asp[/url]
While creating folder on the remote machine, we are specifying the UNC path
as per the example. But we get this error "could not find a part of the
path".
we are prefixing the path with @ symbol and also tried with the escaping the
"\\".
Path is correct and and all the permissions have been granted. ASP.net
application and the remote folder machine are in the same domain. We tried
with mapped drive as well , it did't work.
We are trying out the sample application you have sent. CreateFolder method
is invoked from the Default.appx.cs file's Page_load method and remote
folder path is passed to the CreateFolder method and it is shown below.
CreateFolder(@"\\mypath\shared", "IOFolder");
Here mypath is the remote machine and is in the same domain of Web
application. "shared" folder is shared for everyone and full access has been
given to all the users.
Below is the code snippet from the CreateFolder Method
try
{
DirectoryInfo dirInfo = new DirectoryInfo(strTragetLocation);
Response.Write(dirInfo.Exists);
string strFolderToCreate = strTragetLocation + "\\" + strFolder;
Directory.CreateDirectory(strFolderToCreate);
}
catch (Exception ex)
{
Response.Write(ex.Message);
return false;
}
In the above code DirectoryInfo.Exists method returns false and after that
it tries to CreateDirectory and it throws the following exception "Could not
find a part of the path \"\\\\mypath\\shared\."."
Any ideas ?
Steve Guest
-
Find COM component path in ASP
I'm currently trying to move an existing ASP site to a new server. I need to find all of the dependant COM components and their path on the old... -
Error: Could not find a part of the path / Reading and Writing to files in ASP.Net
Hello, I'm trying to read a text file located in the top folder of the virtual directory and I'm receiving the following error: "Could not... -
HELP! Can't find path to text file
Hi Everybody, Someone PLEASE help me figure this one out! I am using a Flash template that someone else designed. The movie I'm working on only... -
"Could not find a part of the path… " error on IIS 6.0
I have an ASP.NET web application running on a load-balanced Windows Server 2003 web farm running IIS 6.0, using Active Directory authentication. ... -
Err Msg : Cannot find file '%path%'. Please make sure.....
I recently installed Trend Micro Office Scan on my PC at work and found out my computer was infected with tree viruses. I do not have the virus... -
bruce barker #2
Re: Could not find path error
the problem is probably permission. unless your asp.net account is a domain
account, it will not be able to access the share. if you must use a local
account, you will need to set the password, and create a matching local
account (with the same password) on the share, or use impersonation and fill
a domain account and password.
-- bruce (sqlwork.com)
"Steve" <anonymous@discussions.com> wrote in message
news:OOMGA3QtEHA.2864@TK2MSFTNGP09.phx.gbl...path> Hi all,
> I am referring to this article in MSDN :
> [url]http://msdn.microsoft.com/library/en-us/secauthn/security/logonuser.asp[/url]
>
> While creating folder on the remote machine, we are specifying the UNCthe> as per the example. But we get this error "could not find a part of the
> path".
>
> we are prefixing the path with @ symbol and also tried with the escapingmethod> "\\".
> Path is correct and and all the permissions have been granted. ASP.net
> application and the remote folder machine are in the same domain. We tried
> with mapped drive as well , it did't work.
>
> We are trying out the sample application you have sent. CreateFolderbeen> is invoked from the Default.appx.cs file's Page_load method and remote
> folder path is passed to the CreateFolder method and it is shown below.
>
> CreateFolder(@"\\mypath\shared", "IOFolder");
> Here mypath is the remote machine and is in the same domain of Web
> application. "shared" folder is shared for everyone and full access hasthat> given to all the users.
>
> Below is the code snippet from the CreateFolder Method
>
> try
>
> {
>
> DirectoryInfo dirInfo = new DirectoryInfo(strTragetLocation);
>
> Response.Write(dirInfo.Exists);
>
> string strFolderToCreate = strTragetLocation + "\\" + strFolder;
>
> Directory.CreateDirectory(strFolderToCreate);
>
> }
>
> catch (Exception ex)
>
> {
>
> Response.Write(ex.Message);
>
> return false;
>
> }
>
> In the above code DirectoryInfo.Exists method returns false and afternot> it tries to CreateDirectory and it throws the following exception "Could> find a part of the path \"\\\\mypath\\shared\."."
>
> Any ideas ?
>
>
>
>
bruce barker Guest



Reply With Quote

