asp.net.ph

FormsAuthentication.SetAuthCookie Method ( String, Boolean )

System.Web.Security Namespace   FormsAuthentication Class


Creates an authentication ticket for the given userName and createPersistentCookie and attaches it to the cookie's collection of the outgoing response. It does not perform a redirect.

[ VB ]
Overloads Public Shared Sub SetAuthCookie ( _
   userName As String, _
   createPersistentCookie As Boolean _
)

[ C# ]
public static void SetAuthCookie (
   string userName,
   bool createPersistentCookie
);

[ C++ ]
public: static void SetAuthCookie (
   String* userName,
   bool createPersistentCookie
);

[ JScript ]
public static function SetAuthCookie (
   userName : String,
   createPersistentCookie : Boolean
);

Parameters

userName
The name of an authenticated user. This does not have to map to a Windows account.
createPersistentCookie
Specifies whether or not a durable cookie ( one that is saved across browser sessions ) should be issued.

Remarks

This has the effect of creating an authenticated user. Applications can use this when they intend to manually redirect, or if they do not want to redirect. For example, you can use this for an embedded logon area on a page.

See Also

FormsAuthentication Members   FormsAuthentication.SetAuthCookie Overload List Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph