Creates an authentication cookie for a given user name. This does not set the cookie as part of the outgoing response.
- userName
The name of the authenticated user.
- createPersistentCookie
true to create a durable cookie (one that is saved across browser sessions); otherwise, false.
- strCookiePath
The System.Web.HttpCookie.Path of the authentication cookie.
![]()
An System.Web.HttpCookie that contains encrypted forms-authentication ticket information.