SetAuthTypes Method

The SetAuthTypes method sets the authentication type for a specified IIS meta-base URL. 

IDL Definition

HRESULT SetAuthTypes(BSTR bszPath, LONG lTypes);

Parameters

bszPath

the IIS meta-base path to set the authentication type for.

lTypes

the types to set. 

Return Value

a standard HRESULT value

Remarks

In C++, the const values listed below can be used to create the value to send the object in the lTypes parameter.  The can be combined in the standard bitwise "OR" to represent multiple types.  In higher level languages, one can pass the sum instead.

The typedef values found in the type library are listed below. 

const LONG BROK_AUTH_TYPE_ANON =           0x0001;
const LONG BROK_AUTH_TYPE_PWDCOOKIE =      0x0002;
const LONG BROK_AUTH_TYPE_BASIC =          0x0004;
const LONG BROK_AUTH_TYPE_DPA =            0x0008;

This information updates the IIS meta-base. 

Example

Set ObjCreator = CreateObject("ObjCreator.ObjCreator.1")
Set BrokServers = ObjCreator.CreateObjAuth("MemAdmin.BrokServers.1")

tbasic = 4
tAnon = 1
ltypes = tbasic + tAnon
' this works because the values are bitwise, so no carrying is
'  required.
Path = "/LM/W3SVC/2/ROOT/dir1/dir2"
BrokServers.SetAuthTypes (Path,ltypes)

© 1997-1998 Microsoft Corporation. All rights reserved.