How to login user programatically?
My requirement is, when user logs in to the web site for the first time he has to change his UserName.
I have custom stored procedure which updates the username in aspnet_users table. it works fine. but problem is how do
i automatically relogin user using new username. I dont want to redirect user to login page.
so these are the steps
1> user logs in using old username
2> HttpContext.Current.User.Identity is set to old username
3>I force user to change username
4> username updated in the DB
5> Now i want to relogin user using new username so that HttpContext.Current.User.Identity is using new username
...
Go to the complete details ...