FormsAuthentication.EnableCrossAppRedirects Property

Gets a value indicating whether authenticated users can be redirected to URLs in other Web applications.

Namespace: System.Web.Security
Assembly: System.Web (in system.web.dll)

public static bool EnableCrossAppRedirects { get; }
/** @property */
public static boolean get_EnableCrossAppRedirects ()

public static function get EnableCrossAppRedirects () : boolean

Not applicable.

Property Value

true if authenticated users can be redirected to URLs in other Web applications; otherwise, false. The default is false.

The EnableCrossAppRedirects property value is set using the enableCrossAppRedirects attribute of the forms configuration element.

The EnableCrossAppRedirects property is checked within the RedirectFromLoginPage method when the redirect URL does not point to a page in the current application. If EnableCrossAppRedirects is true, then the redirect is performed; if EnableCrossAppRedirects is false, the browser is redirected to the page defined in the DefaultUrl property.


When performing redirects across applications, you must ensure that several of the attributes in the forms configuration element are duplicated across the authenticated applications. For more information and an example, see Forms Authentication Across Applications.

The following code example sets the enableCrossAppRedirects attribute to true in the Web.config file for an ASP.NET application.

<authentication mode="Forms">
  <forms loginUrl="member_login.aspx"
    enableCrossAppRedirects="true" />

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions