473,473 Members | 2,226 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

System.DirectoryServices & Creatiing Virtual Directorys W2003

Ken
Hi,

We have a component that we've used successfully under W2000 to create
virtual directories on an IIS 5.0 web server. We're in the process of
upgrading to W2003 and I'm now encountering an exception when trying to
create the IIS virtual directory.

The component is .net, v 1.14 and is using System.DirectoryServices. The
code that does the work is:

vDir = iisAdmin.Children.Add(virtualDirectory.Name, "IIsWebVirtualDir");
vDir.Properties["AppFriendlyName"][0] = virtualDirectory.AppFriendlyName;
vDir.Properties["AppIsolated"][0] = virtualDirectory.AppIsolated;
vDir.Properties["AccessRead"][0] = virtualDirectory.AccessRead;
vDir.Properties["AccessWrite"][0] = virtualDirectory.AccessWrite;
vDir.Properties["AccessExecute"][0] = virtualDirectory.AccessExecute;
vDir.Properties["AccessScript"][0] = virtualDirectory.AccessScript;
vDir.Properties["AccessSource"][0] = virtualDirectory.AccessSource;

vDir.Properties["AccessNoRemoteRead"][0] =
virtualDirectory.AccessNoRemoteRead;
vDir.Properties["AccessNoRemoteWrite"][0] =
virtualDirectory.AccessNoRemoteWrite;
vDir.Properties["AccessNoRemoteExecute"][0] =
virtualDirectory.AccessNoRemoteExecute;
vDir.Properties["AccessNoRemoteScript"][0] =
virtualDirectory.AccessNoRemoteScript;
vDir.Properties["EnableDefaultDoc"][0] = virtualDirectory.EnableDefaultDoc;
vDir.Properties["EnableDirBrowsing"][0] =
virtualDirectory.EnableDirectoryBrowsing;
vDir.Properties["AccessFlags"][0] = virtualDirectory.ExecutionPermission;
vDir.Properties["DefaultDoc"][0] = virtualDirectory.DefaultDoc;

vDir.Properties["Path"][0] = virtualDirectory.Path;

if(isApplication && virtualDirectory.AppIsolated ==
Wellmark.Enterprise.Utilities.Deployment.Applicati onIsolationType.High)
{
vDir.Invoke("AppCreate", false);
}

vDir.CommitChanges();
vDir = iisAdmin.Children.Add(virtualDirectory.Name, "IIsWebVirtualDir");
vDir.Properties["AppFriendlyName"][0] = virtualDirectory.AppFriendlyName;
vDir.Properties["AppIsolated"][0] = virtualDirectory.AppIsolated;
vDir.Properties["AccessRead"][0] = virtualDirectory.AccessRead;
vDir.Properties["AccessWrite"][0] = virtualDirectory.AccessWrite;
vDir.Properties["AccessExecute"][0] = virtualDirectory.AccessExecute;
vDir.Properties["AccessScript"][0] = virtualDirectory.AccessScript;
vDir.Properties["AccessSource"][0] = virtualDirectory.AccessSource;

vDir.Properties["AccessNoRemoteRead"][0] =
virtualDirectory.AccessNoRemoteRead;
vDir.Properties["AccessNoRemoteWrite"][0] =
virtualDirectory.AccessNoRemoteWrite;
vDir.Properties["AccessNoRemoteExecute"][0] =
virtualDirectory.AccessNoRemoteExecute;
vDir.Properties["AccessNoRemoteScript"][0] =
virtualDirectory.AccessNoRemoteScript;
vDir.Properties["EnableDefaultDoc"][0] =
virtualDirectory.EnableDefaultDoc;
vDir.Properties["EnableDirBrowsing"][0] =
virtualDirectory.EnableDirectoryBrowsing;
vDir.Properties["AccessFlags"][0] =
virtualDirectory.ExecutionPermission;
vDir.Properties["DefaultDoc"][0] = virtualDirectory.DefaultDoc;

vDir.Properties["Path"][0] = virtualDirectory.Path;

if(isApplication && virtualDirectory.AppIsolated ==
Wellmark.Enterprise.Utilities.Deployment.Applicati onIsolationType.High)
{
vDir.Invoke("AppCreate", false);
}

vDir.CommitChanges();
I'd appreciate it if someone can point me to the info that tell's me what's
changed between the iis 5 and iis 6 that would be causing this problem
Jul 21 '05 #1
0 2441

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

Similar topics

12
by: hykim | last post by:
Hello, everyone. according to MSDN, there is any constructor of System.DirectoryServices.SearchResultCollection Class. if I implement DirectorySearcher.FindAll() method by myself, then how can I...
1
by: Jason Gleason | last post by:
I am using the following method in a web service that utilizes the system.directoryservices namespace: public ArrayList GetAllAppPools(){ System.DirectoryServices.DirectoryEntry apppools = new...
1
by: Stephanie Stowe | last post by:
Hi. I am trying to read information out of the IIS metabase (v5.1). Observe the following code: using System; using System.DirectoryServices; using System.Reflection; namespace ADSI1 {...
3
by: Amir Eshterayeh | last post by:
Dear Friends Would you please give me your professional idea about this asp.net problem. I need different virtual directory for different customer with their names like these:...
0
by: Dwaine | last post by:
I got stumpped on this a while back and used a workaround that involved the "same local username/pwd on both servers" method. Now I'd like to find a cleaner method.... The setup: A webApp...
2
by: Kelvin | last post by:
Hello I am using web matrix develop a login page through Active Directory but I cannot figure out why it is giving me an error when importing system.directoryServices. Any help will do! thank ...
0
by: Ken | last post by:
Hi, We have a component that we've used successfully under W2000 to create virtual directories on an IIS 5.0 web server. We're in the process of upgrading to W2003 and I'm now encountering an...
4
by: Brandon McCombs | last post by:
Hello, From my understanding, DirectoryEntry is used to connect to Active Directory. Although this makes no sense whatsoever I accept it. The problem is how am I supposed to test whether a...
7
by: =?Utf-8?B?SmVycnkgQw==?= | last post by:
I am using this code to get groups for a user and getting a error (5) on the GetAuthorizationGroups() function . There are two domains. This function works on the local domain but does not work...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.