Delen via


RequireHttpsAttribute Class

Definition

Represents an attribute that forces an unsecured HTTP request to be re-sent over HTTPS.

[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=false, Inherited=true)]
public class RequireHttpsAttribute : System.Web.Mvc.FilterAttribute, System.Web.Mvc.IAuthorizationFilter
type RequireHttpsAttribute = class
    inherit FilterAttribute
    interface IAuthorizationFilter
Public Class RequireHttpsAttribute
Inherits FilterAttribute
Implements IAuthorizationFilter
Inheritance
RequireHttpsAttribute
Attributes
Implements

Constructors

RequireHttpsAttribute()

Initializes a new instance of the RequireHttpsAttribute class.

RequireHttpsAttribute(Boolean)

Properties

AllowMultiple

Gets or sets a value that indicates whether more than one instance of the filter attribute can be specified.

(Inherited from FilterAttribute)
Order

Gets or sets the order in which the action filters are executed.

(Inherited from FilterAttribute)
Permanent

Methods

HandleNonHttpsRequest(AuthorizationContext)

Handles unsecured HTTP requests that are sent to the action method.

OnAuthorization(AuthorizationContext)

Determines whether a request is secured (HTTPS) and, if it is not, calls the HandleNonHttpsRequest(AuthorizationContext) method.

Applies to