UrlAuthorizationModule.CheckUrlAccessForPrincipal Method
.NET Framework 2.0
Determines whether the user has access to the requested file.
Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)
Assembly: System.Web (in system.web.dll)
public static boolean CheckUrlAccessForPrincipal ( String virtualPath, IPrincipal user, String verb )
public static function CheckUrlAccessForPrincipal ( virtualPath : String, user : IPrincipal, verb : String ) : boolean
Not applicable.
Parameters
- virtualPath
The virtual path to the file.
- user
An IPrincipal object representing the current user.
- verb
The HTTP verb used to make the request.
Return Value
true if the current user can access the file; otherwise, false.The CheckUrlAccessForPrincipal method checks to see whether the current user is granted access to the requested file in the Web.config file for the application.
If the HTTP verb used to make the request is GET, POST, or HEAD, the CheckUrlAccessForPrincipal method checks for read access to the file. If any other verb is used, the CheckUrlAccessForPrincipal checks for read/write access to the file.
For more information and an example Web.config file, see the UrlAuthorizationModule class documentation.
- SecurityPermission for unrestricted access to the resource. Demand value: Demand; Permission value: Unrestricted.
Community Additions
ADD
Show: