Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

EnableRateLimitingAttribute Class

Definition

Namespace:
Microsoft.AspNetCore.RateLimiting
Assembly:
Microsoft.AspNetCore.RateLimiting.dll
Package:
Microsoft.AspNetCore.App.Ref v10.0.0
Package:
Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
Package:
Microsoft.AspNetCore.RateLimiting v7.0.0-rc.2.22476.2
Package:
Microsoft.AspNetCore.App.Ref v8.0.19
Package:
Microsoft.AspNetCore.App.Ref v9.0.8
Source:
EnableRateLimitingAttribute.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Metadata that provides endpoint-specific request rate limiting.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public sealed class EnableRateLimitingAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)>]
type EnableRateLimitingAttribute = class
 inherit Attribute
Public NotInheritable Class EnableRateLimitingAttribute
Inherits Attribute
Inheritance
EnableRateLimitingAttribute
Attributes

Remarks

Replaces any policies currently applied to the endpoint. The global limiter will still run on endpoints with this attribute applied.

Constructors

Name Description
EnableRateLimitingAttribute(String)

Creates a new instance of EnableRateLimitingAttribute using the specified policy.

Properties

Name Description
PolicyName

The name of the policy which needs to be applied.

Applies to


Feedback

Was this page helpful?