Permission Checker

Overview

The Permission Checker component provides you with an interface to the authentication and permissions services provided by IIS and Windows 2000. You can use this component to easily determine whether a client browser has read-access to a particular file.

Code Tour

This example demonstrates the use of the PermissionChecker object, provided by the Permission Checker component, and the sole method provided through that object, HasAccess. This method returns True if the current client browser is granted read access to the specified file, and returns False if the browser is denied access, or if the file doesn't exist. HasAccess can take as a parameter either a virtual path or a physical path.

For this example, an instance of the object is created, and the variable Check is set to refer to that new instance. Check is then used to access HasAccess.

Location

The VBScript and JScript versions of this script are available in the IIS samples directory, at ...\asp\components\PermissionCheck_VBScript.asp and ...\asp\components\PermissionCheck_JScript.asp.