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



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

This article was previously published under Q318709

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_ServerName.

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 drive:\Inetpub\Wwwroot\MyFolder, where drive is the drive on which Windows is installed.
  2. Copy the W3Who.dll file from the folder where the Windows 2000 Server Resource Kit is installed (by default, it is the drive:\Program Files\Resource Kit folder, where drive is the drive on which Windows is installed) to the folder that you created in step 1.
  3. Start Internet Services Manager, or open the MMC that contains the IIS snap-in.
  4. Expand * ServerName, where ServerName is the name of the server.
  5. Expand the Web site to which the folder that contains the W3Who.dll file belongs. For example, expand the Default Web Site.
  6. Right-click the folder that contains the W3Who.dll file, and then click Properties.
  7. Click the Home Directory, Directory or the Virtual Directory tab (as appropriate).
  8. In the Execute Permissions box under Application Settings, click Scripts and Executables, and then click OK.
  9. 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:
  1. 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:
      <p><a href="W3Who.dll">Who Are You</a>
      						

      -or-

    • Include the following HTML code in a Web page to create a button that posts an HTML form:
      <form action="W3Who.dll" method="GET">
      <div align="center"><center><p><input type="submit" value="Who Are You">
      </form>
      						
  2. Start your browser, and then connect to the Web page that contains the reference to W3Who.dll. For example, http://MyWebServer/MyFolder/MyWebPage.htm.
  3. 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_ServerName 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 
    					
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 "Security" section of the IIS 5.0 Online Documentation.

back to the top

REFERENCES

To download the Browser Client Context Tool (W3Who.dll), visit the following Microsoft Web site: For more information about IIS, see the IIS 5.0 Documentation. If IIS is installed on the computer, start Microsoft Internet Explorer, type the following URL in the Address bar, and then press ENTER: Alternatively, to view the IIS 5.0 documentation, visit the following Microsoft Web site: For more information about the Windows 2000 Resource Kit, visit the following Microsoft Web site: back to the top

Modification Type:MajorLast Reviewed:9/27/2006
Keywords:kbhowto kbHOWTOmaster KB318709