Condividi tramite


AccessCheckRule.TryCheckAccess Method

Checks whether this authorization rule applies to the specified user and, if so, whether they are granted access to the Web service method.

Namespace: Microsoft.Web.Services3.Design
Assembly: Microsoft.Web.Services3 (in microsoft.web.services3.dll)

Usage

'Usage
Dim principal As IPrincipal
Dim accessCheckResult As Boolean
Dim returnValue As Boolean
Dim accessCheckRule1 As AccessCheckRule
returnValue = accessCheckRule1.TryCheckAccess(principal, accessCheckResult)

Syntax

'Declaration
Public Function TryCheckAccess( _
    ByVal principal As IPrincipal, _
    <OutAttribute()> ByRef accessCheckResult As Boolean _
) As Boolean
public bool TryCheckAccess(
    IPrincipal principal, 
    out bool accessCheckResult
);
public:
bool TryCheckAccess(
    IPrincipal^ principal,
    [Out] bool% accessCheckResult
);
public boolean TryCheckAccess(
    IPrincipal principal, 
    /*out*/boolean accessCheckResult
);
public function TryCheckAccess(
     principal : IPrincipal, 
     accessCheckResult : Boolean
) : Boolean;

Parameters

  • principal
    The System.Security.Principal.IPrincipal that represents the user to check.
  • accessCheckResult
    When this method returns, true to indicate this rule applies to the user specified in the principal parameter and they are granted access to the Web service method; otherwise false. This parameter is passed uninitialized.

Return Value

true to indicate this authorization rule applies to the user specified in the principal parameter; otherwise, false.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows 2000, Windows 2000 Server, Windows 2000 Advanced Server

Target Platforms

See Also

Reference

AccessCheckRule Class
AccessCheckRule Members
Microsoft.Web.Services3.Design Namespace