你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AuthorizeLevelAttribute Class

Definition

Important

This API is not CLS-compliant.

Apply this attribute to SignalR Microsoft.AspNet.SignalR.Hub classes or methods to control access to them. Based on the AuthorizationLevel specified, access to the target action will be restricted to requests that have been granted that level or higher.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
[System.CLSCompliant(false)]
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes", Justification="It is more important from a usability issue that this is not sealed.")]
public class AuthorizeLevelAttribute : Microsoft.AspNet.SignalR.AuthorizeAttribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
[<System.CLSCompliant(false)>]
[<System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1813:AvoidUnsealedAttributes", Justification="It is more important from a usability issue that this is not sealed.")>]
type AuthorizeLevelAttribute = class
    inherit AuthorizeAttribute
Public Class AuthorizeLevelAttribute
Inherits AuthorizeAttribute
Inheritance
Microsoft.AspNet.SignalR.AuthorizeAttribute
AuthorizeLevelAttribute
Attributes
System.AttributeUsageAttribute System.CLSCompliantAttribute System.Diagnostics.CodeAnalysis.SuppressMessageAttribute

Constructors

AuthorizeLevelAttribute(AuthorizationLevel)

Initializes a new instance of the AuthorizeLevelAttribute with a given level.

Properties

Level

The minimum authorization level required to access the resource.

Methods

UserAuthorized(IPrincipal) Microsoft.AspNet.SignalR.AuthorizeAttribute.UserAuthorized(System.Security.Principal.IPrincipal)

Applies to