471,338 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 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 2348

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Stephanie Stowe | last post: by
3 posts views Thread by Amir Eshterayeh | last post: by
2 posts views Thread by Kelvin | last post: by
4 posts views Thread by Brandon McCombs | last post: by
7 posts views Thread by =?Utf-8?B?SmVycnkgQw==?= | last post: by
reply views Thread by rosydwin | last post: by

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.