By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,877 Members | 1,064 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,877 IT Pros & Developers. It's quick & easy.

Creating a Physical Directory Using DirectoryServices

P: n/a
Hi all,

I am wondering is it possible to create a physical Directory such as
"C:\Test" using the DirectoryServices namespace.

If so, does anyone have any resources on how to do it? I should also
mention, I am required to create the physical directory on any machine
within the current AD domain.

Kind Regards
Oct 26 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
"Mick Walker" <ma**********@privacy.netwrote in message
I wish to be able create a folder on any computer within the current
Active Directory Domain.

I am controling IIS using the Microsoft.Web.Administration.

We are using windows 2008 build 6001

I can create the nessesary items within IIS, websites, Virtual Folders,
set permissions etc. All I need now is a way to create the physical path
to correspond to the properties I am setting.

ASP.Net is running with suitable permissions to impersonate a user that
has permission to create folders on the target machines (Web Servers).
Creating folders server-side should be no problem so long as ASP.NET can see
the drives on which you want to create the folders...
If I cant do it via DirectoryServices, I think I shall have to go down the
path (No not a file system path :-P) of having a WebService running on
each of the Web Server in the AD domain, that will be able to create the
file structures needed, However I would like to use Directory Services to
avoid the potential security risks of the latter method.
There simply is no way to persuade DirectoryServices to create folders -
it's just not what it's for...

What errors do you get if you do something like:

DirectoryInfo di = Directory.CreateDirectory("\\ServerName\\c$\\Test" );
Mark Rae

Oct 26 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.