FormsCookieName

  • Thread starter Thread starter Lubomir
  • Start date Start date
L

Lubomir

Hi,
Somwhere on Internet I saw this example how to create and log-in the new user:
a/ Membership.CreateUser(...)
b/ Response.CookiesRemove(FormsAuthentication.FormsCookieName)
c/ Response.Redirect("some url within app")

1/
I don't understand the line b/ why it is needed to remove the default cookie
name .ASPXAUTH?

2/
Do I need to set up FormsCookieName property to unique value for every new
user, or can I use the same name for all user within one web application (web
site).

3/
Is FormsCookieName used just as a prefix for a cookie or it should
unambiguously indentify the user cookie?

Thanks fro help,
Lubomir
 
One more question:

<authentication mode=Forms>
<forms name = ".ASPXAUTH">
</authentication>

Is the <forms name = ".ASPXAUTH"> used for application wide cookies, while
when I am creating a new user, I have to create a unique cookie
name?FormsAuthentication.SetAuthenticationCookie (userName, ...);

Lubomir
 
Back
Top