Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ValidateAntiForgeryTokenAttribute Class

 

Represents an attribute that is used to prevent forgery of a request.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

System.Object
  System.Attribute
    System.Web.Mvc.FilterAttribute
      System.Web.Mvc.ValidateAntiForgeryTokenAttribute

[AttributeUsageAttribute(AttributeTargets.Class | AttributeTargets.Method, 
	AllowMultiple = false, Inherited = true)]
public sealed class ValidateAntiForgeryTokenAttribute : FilterAttribute, 
	IAuthorizationFilter

NameDescription
System_CAPS_pubmethodValidateAntiForgeryTokenAttribute()

Initializes a new instance of the ValidateAntiForgeryTokenAttribute class.

NameDescription
System_CAPS_pubpropertyAllowMultiple

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

System_CAPS_pubpropertyOrder

Gets or sets the order in which the action filters are executed.(Inherited from FilterAttribute.)

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Attribute.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_pubmethodIsDefaultAttribute()

(Inherited from Attribute.)

System_CAPS_pubmethodMatch(Object)

(Inherited from Attribute.)

System_CAPS_pubmethodOnAuthorization(AuthorizationContext)

Called when authorization is required.

System_CAPS_pubmethodToString()

(Inherited from Object.)

System_CAPS_security Security Note

This attribute helps defend against cross-site request forgery. It won’t prevent other forgery or tampering attacks.

For more information about using attributes, see .

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2017 Microsoft