MobileFormsAuthentication.RedirectFromLoginPage Method (String, Boolean, String)

Redirects an authenticated user to the originally requested URL after logging in.

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

public:
static void RedirectFromLoginPage (
	String^ userName, 
	bool createPersistentCookie, 
	String^ strCookiePath
)
public static void RedirectFromLoginPage (
	String userName, 
	boolean createPersistentCookie, 
	String strCookiePath
)
public static function RedirectFromLoginPage (
	userName : String, 
	createPersistentCookie : boolean, 
	strCookiePath : String
)
Not applicable.

Parameters

userName

Name of the user for cookie authentication purposes. This does not need to map to an account name and is used by URL Authorization.

createPersistentCookie

Specifies whether or not a durable cookie (one that is session based or outlasts the session) must be issued.

strCookiePath

Returns the configured cookie path used for the current application.

The methods create an encrypted string from the authentication cookie and append it to the redirecting URL of the originating request. A client-side redirect is then issued for that URL. This can be used to work around the limitations of certain mobile devices that either do not support cookies, or support cookies that are too small for storing authentication information in a secure manner.

The following example demonstrates how to use the RedirectFromLoginPage method to send the authenticated user back to the URL that was originally requested.

No code example is currently available or this language may not be supported.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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, 1.1

Community Additions

ADD
Show: