Microsoft KB Archive/318709

= HOW TO: Use the Browser Client Context Tool (W3Who.dll) in Internet Information Services 5.0 =

Article ID: 318709

Article Last Modified on 9/14/2007

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server
 * Microsoft Windows 2000 Professional Edition

-



This article was previously published under Q318709



IN THIS TASK
SUMMARY
 * How to Install and Configure W3Who.dll
 * How to Use W3Who.dll

REFERENCES



SUMMARY
This step-by-step article describes how to use the Browser Client Context Tool (W3Who.dll) in Microsoft Internet Information Services (IIS) 5.0.

W3Who.dll is available in the Microsoft Windows 2000 Server Resource Kit. It is an Internet Server Application Programming Interface (ISAPI) dynamic-link library (DLL) program that you can use to test a Web site that resides on an IIS Web server.

W3Who.dll can display information about the client browser request including the name, permissions, and group memberships of the current user. It works in a Web page to report information about the context of the client browser and the configuration of the Web server. You can use W3Who to help you debug a Web program or when you want to test security and environment contexts. For example, use W3Who to help you secure the IIS default anonymous user account, IUSER_.

When you call W3Who.dll from an Active Server Page (ASP) or a Hypertext Markup Language (HTML) page, the following information about the access token (security context of the client) is displayed on a Web page in your browser window:
 * Security identifiers that are granted in the access token.
 * Privileges.
 * Environment variables that are transmitted from IIS to the ISAPI program. These variables include the following components:
 * Browser characteristics.
 * Client connection information including remote IP address, remote user name, and HTTP keep-alives.
 * Client request information including request method and Uniform Resource Locator (URL).
 * Web server information including version, name, IP address, and port number.

back to the top

How to Install and Configure W3Who.dll
To install and configure W3Who.dll, follow these steps:
 * 1) Start Internet Explorer, and then create a new folder in the content folder of your Web site.

For example, if the root Web site is the Default Web Site, create a folder named MyFolder so that the path to the folder is the following :\Inetpub\Wwwroot\MyFolder, where   is the drive on which Windows is installed.
 * 1) Copy the W3Who.dll file from the folder where the Windows 2000 Server Resource Kit is installed (by default, it is the  :\Program Files\Resource Kit folder, where   is the drive on which Windows is installed) to the folder that you created in step 1.
 * 2) Start Internet Services Manager, or open the MMC that contains the IIS snap-in.
 * 3) Expand *  , where   is the name of the server.
 * 4) Expand the Web site to which the folder that contains the W3Who.dll file belongs. For example, expand the Default Web Site.
 * 5) Right-click the folder that contains the W3Who.dll file, and then click Properties.
 * 6) Click the Home Directory, Directory or the Virtual Directory tab (as appropriate).
 * 7) In the Execute Permissions box under Application Settings, click Scripts and Executables, and then click OK.
 * 8) Quit Internet Services Manager, or close the IIS snap-in.

back to the top

How to Use W3Who.dll
To use W3Who.dll to generate a report about the security context of the client browser and the configuration of the Web server, follow these steps:  Create a reference to W3Who.dll in an ASP or HTML page that exists in the same folder as the W3Who.dll file. To do this, use one of the following two methods:   Include the following HTML code in a Web page to create a hyperlink: Who Are You

-or-

  Include the following HTML code in a Web page to create a button that posts an HTML form:     </li> Start your browser, and then connect to the Web page that contains the reference to W3Who.dll. For example, http://MyWebServer/MyFolder/MyWebPage.htm.</li>  Click the Who Are You hyperlink or the Who Are You button (as appropriate). The information that W3Who.dll returns is displayed in your browser window.

The following is an example of a report generated by W3Who.dll that displays information about the IUSER_ account. Access Token

'ServerName\IUSR_ServerName' S-1-5-21-187986301-113207581-858275189-1002 'ServerName\None' S-1-5-21-187986301-113207581-858275189-513 '\Everyone' S-1-1-0 'BUILTIN\Guests' S-1-5-32-546 'BUILTIN\Users' S-1-5-32-545 '\LOCAL' S-1-2-0 'NT AUTHORITY\NETWORK' S-1-5-2 'NT AUTHORITY\Authenticated Users' S-1-5-11 SeUndockPrivilege - Remove computer from docking station

Environment variables

AUTH_TYPE: CONTENT_LENGTH:0 CONTENT_TYPE: GATEWAY_INTERFACE:CGI/1.1 PATH_INFO: PATH_TRANSLATED:c:\inetpub\wwwroot QUERY_STRING: REMOTE_ADDR:<IP Address> REMOTE_HOST:<IP Address> REMOTE_USER: REQUEST_METHOD:GET SCRIPT_NAME:/MyWeb/W3Who.dll SERVER_NAME:ServerName SERVER_PORT:80 SERVER_PROTOCOL:HTTP/1.1 SERVER_SOFTWARE:Microsoft-IIS/5.1 HTTP_ACCEPT:image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, */* HTTP_ACCEPT_LANGUAGE:en-ca HTTP_CONNECTION:Keep-Alive HTTP_HOST:ServerName HTTP_REFERER:http://ServerName/MyWeb/test.htm HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; Q312461) HTTP_ACCEPT_ENCODING:gzip, deflate </li></ol>

IMPORTANT: The procedures in this article discuss how to install and test the W3Who.dll tool and do not discuss security issues. For more information about how to configure security in IIS, see the &quot;Security&quot; section of the IIS 5.0 Online Documentation.

back to the top

<div class="references_section">