As I understand, Umbraco (v 4.0.2.1) membership supports the ASP.Net membership provider. The ASP.Net Login control works well for this but...
I need to programmatically login members after they complete the registration form.
I have tried System.Web.Security.FormsAuthentication.Authenticate() but it fails to authenticate.
Login Programmatically with FormsAuthentication.Authenticate
Hello Umbraco Colleagues,
As I understand, Umbraco (v 4.0.2.1) membership supports the ASP.Net membership provider. The ASP.Net Login control works well for this but...
I need to programmatically login members after they complete the registration form.
I have tried System.Web.Security.FormsAuthentication.Authenticate() but it fails to authenticate.
I've read this forum post:
http://our.umbraco.org/forum/developers/api-questions/9595-Programmatically-login-user-with-MemberAddMemberToCache()
But it seems odd to revert to an Umbraco API call since we're using the ASP.Net membership provider.
What's the solution?
Thanks,
David Hill
Hi David,
You should be able to validate a User by communicating with the Membership provider, so something like:
You should then be able to set the auth cookie using:
Hope this helps.
Matt
is working on a reply...