Automatically login the user through code.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
Il y a 14 ans
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?
Il y a 14 ans
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);
Il y a 13 ans
A big thank you from the future :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.