Click here to Skip to main content
16,012,153 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi friends
I am generating cookies for sucesfully logedin user but after successfully login when I m requesting other page then cookies is not working.

I am using simple membership for authenticate user
C#
if (ModelState.IsValid && Membership.ValidateUser(login.username, login.password))
{
  FormsAuthentication.SetAuthCookie(login.username, false);
}

Any one please help me where I am creating mistake.
Posted
Updated 21-Aug-13 21:05pm
v2
Comments
Thomas Daniels 22-Aug-13 2:44am    
Can you show your code?

Also check whether cookies are turned on in your browser, otherwise your browser won't store your generated cookies.
Er Bhargav Dudani 22-Aug-13 2:51am    
after this I am redirecting my page on my index at that time on index page my cookie is working but when I am requsting other page from index then my browser is not sending this cookie.

I have check it using fidller

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900