PC Review


Reply
Thread Tools Rate Thread

IIS 5.0 Metabase/DirectoryServices

 
 
=?Utf-8?B?S2VuIFM=?=
Guest
Posts: n/a
 
      4th Feb 2004
Hi

I'm creating a virtual directoy using .net's
DirectoryServices framework component. We're using IIS 5.0

The properties I'm setting are

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
vDir.CommitChanges()

I can view the virtual directory in the IIS snap in, and
it looks ok. However, when I try to launch a page, I get a
erver error. (The server failed to load
application '/LM/W3SVC/1/Root/DeploymentTest'. The error
was '8007053d'.

Any ideas

Thanks

Ke


 
Reply With Quote
 
 
 
 
Willy Denoyette [MVP]
Guest
Posts: n/a
 
      4th Feb 2004
This is because you didn't create a Web application definition, check the
AppCreate2 method in the Platform SDK doc's for details, but the following
should get you started:

// Call AppCreat2 to create a Web application (0 =In-proc, 1 = Out-proc, 2
= Pooled) , not needed for ASP.NET
object[] applicationType = new object[]{0};
vDir.Invoke("AppCreate2", applicationType);

Willy.

"Ken S" <(E-Mail Removed)> wrote in message
news:A7944DE2-8343-4ECA-9146-(E-Mail Removed)...
> Hi,
>
> I'm creating a virtual directoy using .net's
> DirectoryServices framework component. We're using IIS 5.0.
>
> The properties I'm setting are:
>
> 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;
> vDir.CommitChanges();
>
>
> I can view the virtual directory in the IIS snap in, and
> it looks ok. However, when I try to launch a page, I get a
> erver error. (The server failed to load
> application '/LM/W3SVC/1/Root/DeploymentTest'. The error
> was '8007053d'.)
>
> Any ideas?
>
> Thanks,
>
> Ken
>
>



 
Reply With Quote
 
=?Utf-8?B?S2VuIFM=?=
Guest
Posts: n/a
 
      4th Feb 2004
Willy

Thanks for the info. I was originally calling the AppCreate method after I had already commited the metabase entry for the virtual directory since in some cases I don't need an application. I've placed that call up into the code and call it before the info is commited to the metabase.

Ken
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete IIS metabase? =?Utf-8?B?UmJydA==?= Microsoft ASP .NET 2 20th Nov 2007 04:02 PM
Modifying metabase? Schemer Microsoft ASP .NET 1 23rd Aug 2006 03:17 PM
ISS metabase Carlos Felipe França da Fonseca Microsoft Windows 2000 Advanced Server 0 6th Apr 2006 04:49 AM
Metabase.bin Alan Microsoft Windows 2000 1 27th Mar 2005 04:18 AM
METABASE & W2K SP4 Rich Microsoft Windows 2000 Windows Updates 0 3rd Feb 2004 03:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:15 PM.