Partager via


HttpAntiForgeryException Constructor

Initializes a new instance of the HttpAntiForgeryException class by using a system-supplied message that describes the error.

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

Syntax

'Declaration
Public Sub New
public HttpAntiForgeryException()
public:
HttpAntiForgeryException()

Remarks

This constructor initializes the Message property to a system-supplied message that describes the error, such as "DefaultMessageDisplayedByParameterlessCtorWriterMustSupply". This message takes into account the current system culture.

The following table shows the initial property values for an instance of InsufficientMemoryException.

Property

Value

InnerException

null reference (Nothing in Visual Basic).

Message

The localized error message string.

See Also

Reference

HttpAntiForgeryException Class

HttpAntiForgeryException Overload

System.Web.Mvc Namespace

Other Resources

Handling and Throwing Exceptions