473,602 Members | 2,792 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Creating a Physical Directory Using DirectoryServic es

Hi all,

I am wondering is it possible to create a physical Directory such as
"C:\Test" using the DirectoryServic es 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
1 1295
"Mick Walker" <ma**********@p rivacy.netwrote in message
news:5o******** ****@mid.indivi dual.net...
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.A dministration.

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 DirectoryServic es, 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 DirectoryServic es to create folders -
it's just not what it's for...

What errors do you get if you do something like:

DirectoryInfo di = Directory.Creat eDirectory("\\S erverName\\c$\\ Test");
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Oct 26 '07 #2

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

Similar topics

1
1839
by: Hal 9000 | last post by:
In c# we have a function that creates a virtual directory in IIS 6.0 using DirectoryServices API. The code looks like this: // log in to IIS DirectoryEntry rootDir = new DirectoryEntry("IIS://localhost/W3SVC/1/Root",ADMIN_USR,ADMIN_PSWD,AuthenticationTypes.Secure); // create a child virtual directory DirectoryEntry virtualDir = rootDir.Children.Add(name, rootDir.SchemaClassName); // set the virtual directory's physical path
7
2385
by: Jaydeep | last post by:
Hi, Anybody knows how to create virtual directory programmatically under root directory ofcourse from code-behind. I am developing web-based application where I need to create a folder and making this folder as virtual directory in IIS. I know in ASP how to do it. Set objIIS = GetObject("IIS://localhost/W3SVC/1/Root") objIIS.Create("IISWebVirtualDir", strVirtualDirectoryName)
0
1011
by: sudhapadmas | last post by:
Hello netters, I was trying to create a virtual directory in IIS using the following code: System.EnterpriseServices.Internal.IISVirtualRoot vr = new System.EnterpriseServices.Internal.IISVirtualRoot(); string sError; vr.Create("IIS://localhost/W3SVC/1/Root",@"C:\Program
1
4927
by: sudhapadmas | last post by:
Hello netters, I was trying to create a virtual directory in IIS using the following code: System.EnterpriseServices.Internal.IISVirtualRoot vr = new System.EnterpriseServices.Internal.IISVirtualRoot();
0
7993
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8404
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
5867
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3900
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2418
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.