Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

FormsAuthentication.SetAuthCookie Method

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

Overload List

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.

[Visual Basic] Overloads Public Shared Sub SetAuthCookie(String, Boolean)
[C#] public static void SetAuthCookie(string, bool);
[C++] public: static void SetAuthCookie(String*, bool);
[JScript] public static function SetAuthCookie(String, Boolean);

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

[Visual Basic] Overloads Public Shared Sub SetAuthCookie(String, Boolean, String)
[C#] public static void SetAuthCookie(string, bool, string);
[C++] public: static void SetAuthCookie(String*, bool, String*);
[JScript] public static function SetAuthCookie(String, Boolean, String);

See Also

FormsAuthentication Class | FormsAuthentication Members | System.Web.Security Namespace

Show:
© 2015 Microsoft