UrlAuthorizationModule.CheckUrlAccessForPrincipal Methode
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Bepaalt of de gebruiker toegang heeft tot het aangevraagde bestand.
public:
static bool CheckUrlAccessForPrincipal(System::String ^ virtualPath, System::Security::Principal::IPrincipal ^ user, System::String ^ verb);
public static bool CheckUrlAccessForPrincipal(string virtualPath, System.Security.Principal.IPrincipal user, string verb);
static member CheckUrlAccessForPrincipal : string * System.Security.Principal.IPrincipal * string -> bool
Public Shared Function CheckUrlAccessForPrincipal (virtualPath As String, user As IPrincipal, verb As String) As Boolean
Parameters
- virtualPath
- String
Het virtuele pad naar het bestand.
- user
- IPrincipal
Een IPrincipal object dat de huidige gebruiker vertegenwoordigt.
- verb
- String
Het HTTP-werkwoord dat wordt gebruikt om de aanvraag te maken.
Retouren
true als de huidige gebruiker toegang heeft tot het bestand; anders, false.
Uitzonderingen
virtualPath zich buiten het hoofdpad van de toepassing bevindt.
Opmerkingen
De CheckUrlAccessForPrincipal methode controleert of de huidige gebruiker toegang krijgt tot het aangevraagde bestand in het Web.config-bestand voor de toepassing.
Als het HTTP-werkwoord dat wordt gebruikt om de aanvraag te maken, is GET, POSTof HEADals de CheckUrlAccessForPrincipal methode controleert op leestoegang tot het bestand. Als er een ander werkwoord wordt gebruikt, controleert u CheckUrlAccessForPrincipal op lees-/schrijftoegang tot het bestand.
Zie de UrlAuthorizationModule klassedocumentatie voor meer informatie en een voorbeeld van Web.config bestand.