473,405 Members | 2,310 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,405 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 2437

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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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...

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.