90 lines
5.1 KiB
HTML
90 lines
5.1 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=Windows-1252">
|
|
<TITLE>Manipulating the Metabase</TITLE>
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
TempString = navigator.appVersion
|
|
if (navigator.appName == "Microsoft Internet Explorer"){
|
|
// Check to see if browser is Microsoft
|
|
if (TempString.indexOf ("4.") >= 0){
|
|
// Check to see if it is IE 4
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
// Check to see if browser is Netscape
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
//-->
|
|
</script>
|
|
<SCRIPT LANGUAGE="VBScript">
|
|
<!--
|
|
Sub Window_OnLoad()
|
|
Dim frmContents
|
|
On Error Resume Next
|
|
If Not Parent Is Nothing Then
|
|
Set frmContents = Parent.Contents
|
|
If Not frmContents Is Nothing Then
|
|
frmContents.Window.TOCSynch_Click
|
|
End If
|
|
End If
|
|
End Sub
|
|
//--></SCRIPT><META NAME="DESCRIPTION" CONTENT="Internet Information Services reference information">
|
|
<META HTTP-EQUIV="PICS-Label" CONTENT='(PICS-1.1 "<http://www.rsac.org/ratingsv01.html>" l comment "RSACi North America Server" by "inet@microsoft.com <mailto:inet@microsoft.com>" r (n 0 s 0 v 0 l 0))'>
|
|
<META NAME="MS.LOCALE" CONTENT="EN-US">
|
|
<META NAME="MS-IT-LOC" Content="Internet Information Services">
|
|
</HEAD>
|
|
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">
|
|
|
|
<H2><A NAME="_k2_manipulating_the_metabase"></A><SUP></SUP>Manipulating the Metabase</H2>
|
|
|
|
<P>The IIS Admin Objects expose a hierarchical namespace of objects where each object has an <B>ADsPath</B> property. The <B>ADsPath</B> syntax is similar to that of a Uniform Resource Locator (URL), in the form of IIS://[path], where [path] represents the directory path of the object being accessed. For example, IIS://MyComputer/W3SVC refers to the <B>IIsWebService </B>object for the machine named MyComputer. The object associated with MyComputer is the <B>IIsComputer</B> object, which contains all of the other IIS Admin Objects.</P>
|
|
|
|
<P>To obtain a reference to a named object, you can use the <B>GetObject</B> function in Visual Basic or VBScript.</P>
|
|
|
|
<P><span class=le><B>Note </B></span>Other scripting languages can be used; see the documentation for the scripting language for details, as well as the <A HREF="/iishelp/iis/htm/asp/adsi0aat.htm">ADSI Reference</A>.</P>
|
|
|
|
<P>For example, you can retrieve the current value of <B>ServerComment</B> by inserting the following VBScript into an .asp file. In the following example, the string "LocalHost" is used instead of the explicit name "MyComputer" to access the computer on which IIS is running.</P>
|
|
|
|
<PRE><CODE><%
|
|
Dim ComputerObj
|
|
Dim MaxBW
|
|
Set ComputerObj = GetObject("IIS://LocalHost")
|
|
MaxBW = ComputerObj.Get("MaxBandwidth")
|
|
%>
|
|
</CODE></PRE>
|
|
|
|
<P>This could also be implemented using the <I>object.property</I> syntax, as in the following example.</P>
|
|
|
|
<PRE><CODE><%
|
|
Dim ComputerObj
|
|
Dim MaxBW
|
|
Set ComputerObj = GetObject("IIS://LocalHost")
|
|
MaxBW = ComputerObj.MaxBandwidth
|
|
%>
|
|
</CODE></PRE>
|
|
|
|
<P><span class=le><B>Note </B></span>ASP pages that access the metabase require administrator privileges on the computer on which IIS is running; this is also true when running ASP applications out-of-process. When you execute scripts from a remote computer, you must connect through a secure connection, such as a connection protected by integrated Windows authentication (also called NTLM authentication). It is recommended that you create a server or directory for your administrative .asp files and set the authentication method to use Integrated Windows authentication for the server or directory.</P>
|
|
|
|
<P>For security purposes, out-of-process applications cannot access the metabase unless <A HREF="/iishelp/iis/htm/asp/apro22hx.htm"><B>WamUserName</B></A> is recognized as an administrator. It is recommended that you retain this default behavior unless special circumstances require otherwise.</P>
|
|
|
|
<P>There are two ways you can modify this out-of-process behavior, but each introduces some security risk:
|
|
|
|
<UL type=disc>
|
|
<LI>You can give the IWAM_<I>machinename</I> account anonymous or NTLM access to the metabase, though this will allow access to the metabase for all out-of-process applications created with this default identity. </li>
|
|
|
|
<LI>Or, you can change the identity of the specific out-of-process package to some other account identity, and give only that account administrator-level access to the metabase. This method introduces less potential risk, but it must be implemented for each out-of-process package.</li>
|
|
</UL>
|
|
<hr class="iis" size="1">
|
|
<p align="center"><em><a href="../../../common/colegal.htm">© 1997-2001 Microsoft Corporation. All rights reserved.</a></em></p>
|
|
</BODY>
|
|
</HTML>
|