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

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 2431

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
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...

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.