Directory Services |
DSML Services for Windows can be configured manually. A manual configuration is usually performed to support multiple installations of DSML Services for Windows on the same IIS server.
To configure DSML Services for Windows manually:
Install files for DSML Services for Windows
For more information about installing the files, see Installing DSML Services for Windows.
Configure IIS and Active Directory
Configure the server to support IIS if this has not already been done. You should also have an Active Directory domain controller running before continuing.
Create the DSML virtual directory
This creates the new virtual directory.
Configure the DSML virtual directory
Note It is highly recommended that you enable SSL if you select Basic authentication. This prevents passwords from being transmitted in plaintext.
This step is optional. From the Virtual Directory property page, set the Application Protection to High or Medium isolation.
Modify the DSML configuration file
Modify the dsmlv2.config configuration file found in the %SystemRoot%\system32 directory. The generic template for the configuration file is shown below.
<extensionConfiguration> <virtualDirectory url="virtualDirURL"> <server>serverName</server> <port>portNumber</port> <useSigning>enableLDAPSigning</useSigning> <useSealing>enableLDAPSealing</useSealing> <readonly>enableReadOnlyMode</readOnly> <connectTimeout>connTime</connectTimeout> <operationTimeout>operTime</operationTimeout> <maxConnections>numberOfConnections</maxConnections> <chaseReferrals>chaseReferralsType</chaseReferrals> <sessionsMax>totalSessions</sessionsMax> <sessionsMaxPerIP>sessionPerIP</sessionsMaxPerIP> <sessionsIPMatch>useIPMatching</sessionsIPMatch> <sessionsAuthMatch>useCredentialMatching</sessionsAuthMatch> <sessionsTTL>timeToLive</sessionsTTL> </virtualDirectory> </extensionConfiguration>
virtualDirURL should be filled in with the URL to the extension, without the Web server name. For example, if you create an IIS virtual directory named dsml, which allows the extension to be accessed as http://mywebserver.microsoft.com/dsml/adssoap.dsmlx, set virtualDirURL as /dsml/adssoap.dsmlx.
All of the element tags inside the <virtualDirectory> element are optional. To omit one, omit the entire line, including the surrounding XML elements. For example, to omit serverName, omit <server>serverName</server>:
For example, using the dsml virtual directory example given previously, the following dsmlv2.config would specify that the IIS virtual directory should process requests for an Active Directory server named testdc-01.fabrikam.com. It should connect on port 389, with connection and operation timeouts of 30 seconds. It should keep up to 10 connections open simultaneously.
<extensionConfiguration> <virtualDirectory url="/dsml/adssoap.dsmlx"> <server>testdc-01.fabrikam.com</server> <port>389</port> <connectTimeout>30</connectTimeout> <operationTimeout>30</operationTimeout> <maxConnections>10</maxConnections> </virtualDirectory> </extensionConfiguration>
It is possible to create multiple IIS virtual directories on the Web server that use the adssoap.dsmlx extension. This can be used, for example, for sending requests to different Active Directory servers. All virtual directories on an IIS server share the same dsmlv2.config file. The IIS virtual directories must be created and configured with the proper permissions (using the steps listed previously in this topic) before the DSML Services for Windows configuration file is modified.
To configure a multiple virtual directory installation, create a separate virtualDirectory section for each virtual directory in the configuration file. For example, if you want to extend the example above to include a second virtual directory named dsml2 that sends LDAP operations to a Active Directory server named testdc-02.fabrikam.com (also on port 389, but with no connect or operation timeout, and using the default number of connections), you could create a dsmlv2.config file similar to the following.
<extensionConfiguration> <virtualDirectory url="/dsml/adssoap.dsmlx"> <server>testdc-01.fabrikam.com</server> <port>389</port> <connectTimeout>30</connectTimeout> <operationTimeout>30</operationTimeout> <maxConnections>10</maxConnections> </virtualDirectory> <virtualDirectory url="/dsml2/adssoap.dsmlx"> <server>testdc-02.fabrikam.com</server> </virtualDirectory> </extensionConfiguration>
The dsmlv2.config file should have its file access permissions set so that all authenticated users have read access, and only administrators and IIS administrators have read/write access. This enables the DSML Services for Windows to read the configuration file while impersonating a user, yet prevents the configuration file from being subject to either accidental or malicious changes.
Test the DSML Configuration
The DSML Services for Windows installation is now configured and ready for use. To test the installation, take the following steps:
csript dsmltest.vbs dsmlServerName
The following code example shows a test of the installation.
C:\DSfW>type search.xml <se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"> <se:Body xmlns="urn:oasis:names:tc:DSML:2:0:core"> <batchRequest> <searchRequest dn="dc=fabrikam,dc=com" scope="baseObject" derefAliases="neverDerefAliases" sizeLimit="100"> <filter> <present name="objectClass"/> </filter> <attributes> <attribute name="dc"/> <attribute name="description"/> </attributes> </searchRequest> </batchRequest> </se:Body> </se:Envelope> C:\Program Files\Microsoft\Microsoft DSMLv2 Server>cscript dsmltest.vbs dsml01 Microsoft (R) Windows Script Host Version 5.6 Copyright (C) Microsoft Corporation 1996-2001. All rights reserved. Connecting to DSMLv2 Server... Constructing DSML/SOAP payloads... Sending the request... -------RESPONSE -------- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"> <soap:Body> <batchResponse xmlns="urn:oasis:names:tc:DSML:2:0:core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <searchResponse> <searchResultEntry dn="dc=fabrikam,dc=com"> <attr name="dc"><value>fabrikam</value></attr> </searchResultEntry> <searchResultDone> <resultCode code="0" descr="success"/> </searchResultDone> </searchResponse> </batchResponse></soap:Body></soap:Envelope>