Export (0) Print
Expand All

HttpResponse.SuppressFormsAuthenticationRedirect Property

.NET Framework 4.5

Gets or sets a value that specifies whether forms authentication redirection to the login page should be suppressed.

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

public bool SuppressFormsAuthenticationRedirect { get; set; }

Property Value

Type: System.Boolean
true if forms authentication redirection should be suppressed; otherwise, false.

By default, forms authentication converts HTTP 401 status codes to 302 in order to redirect to the login page. This isn't appropriate for certain classes of errors, such as when authentication succeeds but authorization fails, or when the current request is an AJAX or web service request. This property provides a way to suppress the redirect behavior and send the original status code to the client.

.NET Framework

Supported in: 4.5

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft