asp.net.ph

FormsAuthentication.GetAuthCookie Method ( String, Boolean )

System.Web.Security Namespace   FormsAuthentication Class


Creates an authentication cookie for a given user name. This does not set the cookie as part of the outgoing response, so that an application can have more control over how the cookie is issued.

[ VB ]
Overloads Public Shared Function GetAuthCookie ( _
   userName As String, _
   createPersistentCookie As Boolean _
 ) As HttpCookie

[ C# ]
public static HttpCookie GetAuthCookie (
   string userName,
   bool createPersistentCookie
);

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

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

Parameters

userName
Name of the authenticated user. This does not have to map to a Windows account.
createPersistentCookie
Specifies whether or not a durable cookie ( a cookie that is saved across browser sessions ) should be issued. Cookie path defaults to'/'.

Return Value

Returns an HTTP cookie.

See Also

FormsAuthentication Members   FormsAuthentication.GetAuthCookie 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