Automatically login the user through code.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
14 лет назад
I can not figure out how to login the user.  I have tried all kinds of things including:


bool ok = CustomerManager.Login("[email protected]", "1");


Any ideas?
14 лет назад
Ok, I figured it out. I see you guys are using forms auth for asp.net.

This code will login the user. Replace cust.Username with your Customer object.


FormsAuthentication.SetAuthCookie(cust.Username, false);
13 лет назад
A big thank you from the future :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.