Search:
Namespaces
Discussions
.NET v1.1
Feedback
Could not find a part of the path
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngvb' list
.
Darren Patterson
I am trying to create a directory on a remote server in my network and I
keep getting the following error : "Could not find a part of the path"
Code looks like this:
Dim lobjFileDirectory As Directory
lobjFileDirectory.CreateDirectory(lstrDBFilePath & "Uploads\" &
gstrICcode + "\Upload")
Where lstrDBFilePath is a string set to my remote server,
\\someserver\fileshare\
The permissions on that share is everyone set to full control but I
still can't create the directory.
Any help would be appreciated.
Thanks,
Darren
Reply to this message...
Carlos Magalhaes
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2652.35">
<TITLE>RE: [aspngvb] Could not find a part of the path</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Hi Darren,</FONT>
</P>
<P><FONT SIZE=3D2>That error is not what is says it is ( :)_ ) trust me =
I have been through this.</FONT>
</P>
<P><FONT SIZE=3D2>What in actual fact its saying is that the username =
your app is running as does not have permissions to create a dir on =
that remote server.</FONT></P>
<P><FONT SIZE=3D2>Give a user perm on that share and then use =
impersonation to impersonate that user in your app and you should have =
no problem then /.</FONT></P>
<P><FONT SIZE=3D2>Let me know if it works!</FONT>
</P>
<P><FONT SIZE=3D2>Regards,</FONT>
<BR><FONT SIZE=3D2>Carlos Magalhaes</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Darren Patterson [<A =
HREF=3D"mailto:
Click here to reveal e-mail address
">mailto:
Click here to reveal e-mail address
</A>] =
</FONT>
<BR><FONT SIZE=3D2>Sent: Wednesday, August 14, 2002 8:14 PM</FONT>
<BR><FONT SIZE=3D2>To: aspngvb</FONT>
<BR><FONT SIZE=3D2>Subject: [aspngvb] Could not find a part of the =
path</FONT>
</P>
<BR>
<P><FONT SIZE=3D2>I am trying to create a directory on a remote server =
in my network and I</FONT>
<BR><FONT SIZE=3D2>keep getting the following error : "Could not =
find a part of the path"</FONT>
</P>
<P><FONT SIZE=3D2>Code looks like this:</FONT>
</P>
<P><FONT SIZE=3D2>Dim lobjFileDirectory As Directory</FONT>
</P>
<P><FONT SIZE=3D2>lobjFileDirectory.CreateDirectory(lstrDBFilePath =
& "Uploads\" &</FONT>
<BR><FONT SIZE=3D2>gstrICcode + "\Upload")</FONT>
</P>
<P><FONT SIZE=3D2>Where lstrDBFilePath is a string set to my remote =
server,</FONT>
<BR><FONT SIZE=3D2>\\someserver\fileshare\</FONT>
</P>
<P><FONT SIZE=3D2>The permissions on that share is everyone set to full =
control but I</FONT>
<BR><FONT SIZE=3D2>still can't create the directory.</FONT>
</P>
<P><FONT SIZE=3D2>Any help would be appreciated.</FONT>
</P>
<P><FONT SIZE=3D2>Thanks,</FONT>
<BR><FONT SIZE=3D2>Darren</FONT>
</P>
<P><FONT SIZE=3D2>| [aspngvb] member
Click here to reveal e-mail address
=3D YOUR =
ID</FONT>
<BR><FONT SIZE=3D2>| <A =
HREF=3D"
http://www.asplists.com/asplists/aspngvb.asp
"" target="_blank">
http://www.asplists.com/asplists/aspngvb.asp
" =
TARGET=3D"_blank">
http://www.asplists.com/asplists/aspngvb.asp
</A> =3D =
JOIN/QUIT</FONT>
</P>
</BODY>
</HTML>
-------------------------------------------------------------
This email and any files transmitted are
confidential and intended solely for the
use of the individual or entity to which
they are addressed, whose privacy
should be respected. Any views or
opinions are solely those of the author
and do not necessarily represent those
of the Trencor Group, or any of its
representatives, unless specifically
stated.
Email transmission cannot be guaranteed
to be secure, error free or without virus
contamination. The sender therefore
accepts no liability for any errors or
omissions in the contents of this message,
nor for any virus infection that might result
from opening this message. Trencor is not
responsible in the event of any third party
interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address
For more information about
Trencor, visit www.trencor.net <http://www.trencor.net>
Reply to this message...
Darren Patterson
Who should I give access to the share? I am running IIS locally and I
am trying to save uploaded files to my database server. I created a
share on my local machine that points to a folder on the database. When
I try to add a new user to the share, the only users I am able to select
from are the users on my database machine. For example, I thought I had
to add the aspnet user to be able to access this share and I am unable
to choose that user as he resides on my machine and not the database
machine. I have added the following code to my web.config <identity
impersonate="true" />.
Thanks for you help,
Darren
-----Original Message-----
From: Carlos Magalhaes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 5:06 AM
To: aspngvb
Subject: [aspngvb] RE: Could not find a part of the path
Hi Darren,
That error is not what is says it is ( :)_ ) trust me I have been
through this.
What in actual fact its saying is that the username your app is running
as does not have permissions to create a dir on that remote server.
Give a user perm on that share and then use impersonation to impersonate
that user in your app and you should have no problem then /.
Let me know if it works!
Regards,
Carlos Magalhaes
-----Original Message-----
From: Darren Patterson [mailto:
Click here to reveal e-mail address
]
Sent: Wednesday, August 14, 2002 8:14 PM
To: aspngvb
Subject: [aspngvb] Could not find a part of the path
I am trying to create a directory on a remote server in my network and I
keep getting the following error : "Could not find a part of the path"
Code looks like this:
Dim lobjFileDirectory As Directory
lobjFileDirectory.CreateDirectory(lstrDBFilePath & "Uploads\" &
gstrICcode + "\Upload")
Where lstrDBFilePath is a string set to my remote server,
\\someserver\fileshare\
The permissions on that share is everyone set to full control but I
still can't create the directory.
Any help would be appreciated.
Thanks,
Darren
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID |
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address
For more information about Trencor, visit
www.trencor.net
Reply to this message...
Darren Patterson
A better way to explain this is that I am trying to access the share as
anonymous, I will not be doing this in an intranet and need the ability
for internet users to access the share and upload files to it.
Therefore I cannot access the users windows logon credentials and pass
them via impersonation to the share and check permissions on it. I will
be making my users log onto the site but I will check them against a
database to see if they are valid users then they will be able to upload
files to my remote server, not the web server, which works fine but I
need the ability to upload to a remote server.
Thanks,
Darren
-----Original Message-----
From: Darren Patterson
Sent: Thursday, August 15, 2002 1:24 PM
To: aspngvb
Subject: [aspngvb] RE: Could not find a part of the path
Who should I give access to the share? I am running IIS locally and I
am trying to save uploaded files to my database server. I created a
share on my local machine that points to a folder on the database. When
I try to add a new user to the share, the only users I am able to select
from are the users on my database machine. For example, I thought I had
to add the aspnet user to be able to access this share and I am unable
to choose that user as he resides on my machine and not the database
machine. I have added the following code to my web.config <identity
impersonate="true" />.
Thanks for you help,
Darren
-----Original Message-----
From: Carlos Magalhaes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 5:06 AM
To: aspngvb
Subject: [aspngvb] RE: Could not find a part of the path
Hi Darren,
That error is not what is says it is ( :)_ ) trust me I have been
through this.
What in actual fact its saying is that the username your app is running
as does not have permissions to create a dir on that remote server.
Give a user perm on that share and then use impersonation to impersonate
that user in your app and you should have no problem then /.
Let me know if it works!
Regards,
Carlos Magalhaes
-----Original Message-----
From: Darren Patterson [mailto:
Click here to reveal e-mail address
]
Sent: Wednesday, August 14, 2002 8:14 PM
To: aspngvb
Subject: [aspngvb] Could not find a part of the path
I am trying to create a directory on a remote server in my network and I
keep getting the following error : "Could not find a part of the path"
Code looks like this:
Dim lobjFileDirectory As Directory
lobjFileDirectory.CreateDirectory(lstrDBFilePath & "Uploads\" &
gstrICcode + "\Upload")
Where lstrDBFilePath is a string set to my remote server,
\\someserver\fileshare\
The permissions on that share is everyone set to full control but I
still can't create the directory.
Any help would be appreciated.
Thanks,
Darren
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID |
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID |
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address
For more information about Trencor, visit
www.trencor.net
Reply to this message...
Darren Patterson
This worked and here is what I had to do.
I had to set up a share on a folder on the remote server for where I
wanted to save my files to and give permissions to the user that I want
to impersonate on it.
I put the following in my web.config
<identity impersonate="true" username="someuser" password="somepass"/>.
I granted 'someuser' read/write permissions on the my remote servers
share
And then I save files to or create directories to a path using the UNC
name of the remote server like so:
Dim lstrFilePath as String
lstrFilePath = \\remoteservername\sharename
<file:///\\remoteservername\sharename>
Thanks for you help, this one seems easy now but was difficult until I
knew what levers had to be pulled to make it work.
Thanks,
Darren
-----Original Message-----
From: Carlos Magalhaes [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, August 15, 2002 5:06 AM
To: aspngvb
Subject: [aspngvb] RE: Could not find a part of the path
Hi Darren,
That error is not what is says it is ( :)_ ) trust me I have been
through this.
What in actual fact its saying is that the username your app is running
as does not have permissions to create a dir on that remote server.
Give a user perm on that share and then use impersonation to impersonate
that user in your app and you should have no problem then /.
Let me know if it works!
Regards,
Carlos Magalhaes
-----Original Message-----
From: Darren Patterson [mailto:
Click here to reveal e-mail address
]
Sent: Wednesday, August 14, 2002 8:14 PM
To: aspngvb
Subject: [aspngvb] Could not find a part of the path
I am trying to create a directory on a remote server in my network and I
keep getting the following error : "Could not find a part of the path"
Code looks like this:
Dim lobjFileDirectory As Directory
lobjFileDirectory.CreateDirectory(lstrDBFilePath & "Uploads\" &
gstrICcode + "\Upload")
Where lstrDBFilePath is a string set to my remote server,
\\someserver\fileshare\
The permissions on that share is everyone set to full control but I
still can't create the directory.
Any help would be appreciated.
Thanks,
Darren
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID
|
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
| [aspngvb] member
Click here to reveal e-mail address
= YOUR ID |
http://www.asplists.com/asplists/aspngvb.asp
= JOIN/QUIT
------------------------------------------------------------- This email
and any files transmitted are confidential and intended solely for the
use of the individual or entity to which they are addressed, whose
privacy should be respected. Any views or opinions are solely those of
the author and do not necessarily represent those of the Trencor Group,
or any of its representatives, unless specifically stated. Email
transmission cannot be guaranteed to be secure, error free or without
virus contamination. The sender therefore accepts no liability for any
errors or omissions in the contents of this message, nor for any virus
infection that might result from opening this message. Trencor is not
responsible in the event of any third party interception of this email.
If you have received this email in error please notify
Click here to reveal e-mail address
For more information about Trencor, visit
www.trencor.net
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com