473,395 Members | 1,658 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,395 software developers and data experts.

circumventing CreateDirectory() errors

What are my options for getting around the issues with
Directory.CreateDirectory() when i'm working on a hosted server where the
hosting company will not allow the ASPNET user to have read/list access to
the root of the drive (as is necessary for Directory.CreateDirectory() to
work, sadly)?

I have heard of a way to use unmanaged code to call _mkdir or something like
that instead, but that's very far from a clean solution.

What options are there?

Thanks in advance,

-Tim
Nov 18 '05 #1
1 1040
Hi Tim,

As for the problem you mentioned, I think the better means is to contact
the web host to see whether they can help grant the proper access
permission of your app's folder to aspnet process account. Because
creating/modifying folder/file must have the NTFS file access permission,
we haven't any other means to do this task. Also, if it's impossible to
grant the permission to modify the app's root folder, you can also consider
creating a certain sub folder under the app's root folder and ask the
webhost to see whether can provide any particular setting for that sub dir.
Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 18 '05 #2

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

Similar topics

4
by: Frederico Caldeira Knabben | last post by:
Hello, I'm having a problem when trying to use the Directory.CreateDirectory() method. It throws a DirectoryNotFoundException exception. I'll try to illustrate it: Suppose you have the...
3
by: David Davies | last post by:
Please HELP !! I have a web page that is trying to create folders on a file server eg. \\SERVERNAME\F4\Projects\ Users of the web site are authenticated with Windows Integrated Security. ...
6
by: Chad | last post by:
I am receiving the following two errors in the code below. Both are on Line 56. error C2039: 'CreateDirectoryA' : is not a member of 'System::IO::Directory' error C2660: 'CreateDirectoryA' :...
1
by: Daniel | last post by:
If I call CreateDirectory(\\\\devDriveA\\foo\\bar\\a\\b\\c) and \\devDriveA\foo\bar already exists then sub directories a\b\c don't get created. When I use CreateDirectory on my own file system,...
5
by: Tim | last post by:
Hi, I am trying to create a directory from within my program. I found the IO::Directory::CreateDirectory (filename) function, and used that but I get two errors concerning CreateDirectoryA (one...
1
by: H.B. | last post by:
Hi, Is there a way to avoid conflicts between CreateDirectory() (from API) and Directory::CreateDirectory(). The other functions from Directory class works(Exists() as example). It seems to be...
0
by: hypomite | last post by:
i have been developing a web application (VB.Net) locally for about a month. Everything was going great so i uploaded the project to my web hosting companies server. I was able to build the project...
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:...
5
by: Dan Lorenz | last post by:
When trying to use the function CreateDirectory on my local machine everything works fine but when I upload the page to my webhost I get an issue that it can't find path on D:\, though D:\ is what...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.