Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

AuthorizationContext Class

 

Encapsulates the information that is required for using an AuthorizeAttribute attribute.

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

System.Object
  System.Web.Mvc.ControllerContext
    System.Web.Mvc.AuthorizationContext

public class AuthorizationContext : ControllerContext

NameDescription
System_CAPS_pubmethodAuthorizationContext()

Initializes a new instance of the AuthorizationContext class.

System_CAPS_pubmethodAuthorizationContext(ControllerContext)

Obsolete.Initializes a new instance of the AuthorizationContext class using the specified controller context.

System_CAPS_pubmethodAuthorizationContext(ControllerContext, ActionDescriptor)

Initializes a new instance of the AuthorizationContext class using the specified controller context and action descriptor.

NameDescription
System_CAPS_pubpropertyActionDescriptor

Provides information about the action method that is marked by the AuthorizeAttribute attribute, such as its name, controller, parameters, attributes, and filters.

System_CAPS_pubpropertyController

Gets or sets the controller.(Inherited from ControllerContext.)

System_CAPS_pubpropertyDisplayMode

Gets the display mode.(Inherited from ControllerContext.)

System_CAPS_pubpropertyHttpContext

Gets or sets the HTTP context.(Inherited from ControllerContext.)

System_CAPS_pubpropertyIsChildAction

Gets a value that indicates whether the associated action method is a child action.(Inherited from ControllerContext.)

System_CAPS_pubpropertyParentActionViewContext

Gets an object that contains the view context information for the parent action method.(Inherited from ControllerContext.)

System_CAPS_pubpropertyRequestContext

Gets or sets the request context.(Inherited from ControllerContext.)

System_CAPS_pubpropertyResult

Gets or sets the result that is returned by an action method.

System_CAPS_pubpropertyRouteData

Gets or sets the URL route data.(Inherited from ControllerContext.)

NameDescription
System_CAPS_pubmethodEquals(Object)

(Inherited from Object.)

System_CAPS_protmethodFinalize()

(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

(Inherited from Object.)

System_CAPS_pubmethodGetType()

(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethodToString()

(Inherited from Object.)

When an action method is marked with the AuthorizeAttribute attribute, an AuthorizationContext instance is passed to the OnAuthorization method. The AuthorizationContext class encapsulates information about the controller, HTTP context, request context, route data, action descriptor, and action result.

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:
© 2015 Microsoft