473,322 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Could not find a part of the path

Hi,

I know query in Subject line "Could not find a part of the path" has
been replied before lots of time, but mine is bit different.

My web server is windows 2003 R2 with both .net framework 1.1 and 2.0
installed on C:\.
Websites are saved on D:\wwwroot
I run the follow code for a website which is running on dedicated pool,
aspx files on 1.1 framework:

If Not directory.Exists(Server.mappath("..\Images\" & i)) then
directory.create(Server.mappath("..\Images\" & i))
end if

When i try to create a sub-folder 22 under D:\wwwroot\<website>\Images\
i get following error:

Could not find a part of the path "D:\"

If i manually create folder 22, then the code works fine to upload
images into that folder.

I googled a lot and tried everything... gave aspnet account full
permissions to D:, tried
http://support.microsoft.com/default...b;en-us;827421
also set up asp.net service to run using Network Service, restarted
server.. but all in vain

Then i changed the website properties -ASP.NET tab -ASP.NET version
from 1.1 to 2.0

And this did the trick and code started working fine.
But i have around 70 websites on this server using .net 1.1, and also I
DONT want to use this approach coz I am sure there must be a workaround
to use both 1.1 and 2.0 on same IIS and running websites properly

Please help!!

Thanx in advance

Warm Regards

PS: I got error in event log that permission denied to
\\<servername>\D$\System Volume Information
when i was running servermapdrive service mentioned in
http://support.microsoft.com/default...b;en-us;827421

Aug 31 '06 #1
3 11312
2003, by design, does not allow path traversal, which means your ASP.NET
code is stuck in its tree. You are attempting to traverse back to root of
the drive and create a folder. You can turn of this security feature in IIS,
if you wish to. I believe there is also a code access security setting in
the machine.config that restricts you.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
<go***@rediffmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.com...
Hi,

I know query in Subject line "Could not find a part of the path" has
been replied before lots of time, but mine is bit different.

My web server is windows 2003 R2 with both .net framework 1.1 and 2.0
installed on C:\.
Websites are saved on D:\wwwroot
I run the follow code for a website which is running on dedicated pool,
aspx files on 1.1 framework:

If Not directory.Exists(Server.mappath("..\Images\" & i)) then
directory.create(Server.mappath("..\Images\" & i))
end if

When i try to create a sub-folder 22 under D:\wwwroot\<website>\Images\
i get following error:

Could not find a part of the path "D:\"

If i manually create folder 22, then the code works fine to upload
images into that folder.

I googled a lot and tried everything... gave aspnet account full
permissions to D:, tried
http://support.microsoft.com/default...b;en-us;827421
also set up asp.net service to run using Network Service, restarted
server.. but all in vain

Then i changed the website properties -ASP.NET tab -ASP.NET version
from 1.1 to 2.0

And this did the trick and code started working fine.
But i have around 70 websites on this server using .net 1.1, and also I
DONT want to use this approach coz I am sure there must be a workaround
to use both 1.1 and 2.0 on same IIS and running websites properly

Please help!!

Thanx in advance

Warm Regards

PS: I got error in event log that permission denied to
\\<servername>\D$\System Volume Information
when i was running servermapdrive service mentioned in
http://support.microsoft.com/default...b;en-us;827421

Aug 31 '06 #2
Cheers for the reply.

But how come it works with ASP 2.0 on the same IIS?

And can you please tell me how to
1) "You can turn of this security feature in IIS, if you wish to"
2) "I believe there is also a code access security setting in the
machine.config that restricts you"

Thanks

Cowboy (Gregory A. Beamer) wrote:
2003, by design, does not allow path traversal, which means your ASP.NET
code is stuck in its tree. You are attempting to traverse back to root of
the drive and create a folder. You can turn of this security feature in IIS,
if you wish to. I believe there is also a code access security setting in
the machine.config that restricts you.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Aug 31 '06 #3
Ok, i got the solution.

First of all i have Ensim on this server which creates application
pools that run with user credentials (and users are member of
WVH_ANON_USERS_GROUP)

And when i looked on permission settings on D:, this group had special
permission that denies any sort of access on D:

I gave Read Permissions for D: "This folder only" to
WVH_ANON_USERS_GROUP and it started working.

So bottom line is, that when u get such problem, you should first check
which Application Pool you have defined for the website in IIS. Then in
IIS, right click on that application pool -properties -Identity
If the second radio button is selected, check the username specified
and make sure that user has got read permissions to D: or the root
drive you want to access

HTH
go***@rediffmail.com wrote:
Cheers for the reply.

But how come it works with ASP 2.0 on the same IIS?

And can you please tell me how to
1) "You can turn of this security feature in IIS, if you wish to"
2) "I believe there is also a code access security setting in the
machine.config that restricts you"

Thanks

Cowboy (Gregory A. Beamer) wrote:
2003, by design, does not allow path traversal, which means your ASP.NET
code is stuck in its tree. You are attempting to traverse back to root of
the drive and create a folder. You can turn of this security feature in IIS,
if you wish to. I believe there is also a code access security setting in
the machine.config that restricts you.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
Aug 31 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Matthias Ludwig | last post by:
I'm trying to create a directory on the web server with a vb.net code: .... Dim dirName As String = "w:\filepath\images" If Not Directory.Exists(dirName) Then...
1
by: Alex | last post by:
Hello, in my company, we have a diagnostic tool for hardware. Depending on the hardware projcet, a different project configuration is needed. The configuration file is written in XML and...
5
by: Tom Vogel | last post by:
Creating a subfolder within my ASP.NET application folder fails with the above error, but only at my hosting provider. The command: Directory.CreateDirectory(path) Path is set to...
0
by: jessica | last post by:
Hi, I got a problem "Could not find a part of the path". On my loca machine I mapped the V:\LoggerNet to a remote server folder where th real-time data come in. I checked the file, it gets updated...
0
by: haylow | last post by:
Hi I am new to ASP.NET and am working on an application that runs on a webserver. The user will open up the web interface in a browser on their local machine and enter a path to a directory. I...
1
by: Steve | last post by:
Hi all, I am referring to this article in MSDN : http://msdn.microsoft.com/library/en-us/secauthn/security/logonuser.asp While creating folder on the remote machine, we are specifying the UNC...
9
by: Clinton Frankland | last post by:
Hi, On a Windows 2000 Server when attempting to use System.IO.Directory.CreateDirectory(string.concat(Server.MapPath(""), "\verify")) I receive a System.IO.DirectoryNotFoundException error:...
14
by: Gianfranco | last post by:
Hi everybody, First of all, sorry for my english if it isn't perfect ;-p I have an error in an asp.net application. I have win2003 server, with iis 6. I'm developping with visual studio...
2
by: Guoqi Zheng | last post by:
Dear sir, I am trying to save a binary data by below script, however,it always give me an error of "Could not find a part of the path "C:\temp\". " Any idea what I did wrong here? ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.