I have the site up and running and I'm able login to the Dashboard using the standard interface.
However, when I use a custom surface controller for the client-side to login (using the same username and p/w) - the following code(s) always return false:
Also checked the logs and this is what I'm getting
2016-08-07 16:31:48,071 [P30252/D18/T96] WARN
Umbraco.Web.UmbracoModule - Status code is 404 yet TrySkipIisCustomErrors is false - IIS will take over.
2016-08-07 16:31:55,483 [P30252/D18/T96] INFO
Umbraco.Core.Security.UmbracoMembershipProviderBase - Login attempt failed for username [email protected] from IP address ::1, the user does not exist
2016-08-07 16:32:02,691 [P30252/D18/T96] INFO
Umbraco.Core.Security.UmbracoMembershipProviderBase - Login attempt failed for username [email protected] from IP address ::1, the user does not exist
2016-08-07 16:32:16,181 [P30252/D18/T96] INFO
Umbraco.Web.Mvc.UmbracoPageResult - Executing Umbraco RouteDefinition controller
2016-08-07 16:32:16,262 [P30252/D18/T96] INFO
Umbraco.Web.Mvc.UmbracoPageResult - Finished (took 82ms)
2016-08-07 16:32:16,600 [P30252/D18/T64] WARN
Umbraco.Web.UmbracoModule - Status code is 404 yet TrySkipIisCustomErrors is false - IIS will take over.
You're trying to log in a Member.. while you're putting in the credentials of an Umbraco Backoffice User.
I'd need to look up how to log in a User exactly, but are you sure that's what you want? The same User that you're trying to log in can go to /umbraco and do whatever you allowed them to do.
I thought that may have been the case - so I've now created a Client Register form which will create a new member!
Not sure if anything has changed recently as I've only used the latest version but I have the following tables:
UmbracoUser (Populated)
cmsMember (empty) suspect this is the problem
BTW - I done something which I think is pretty cool with Templates and Properties - is there anywhere I can show what I've done and see if it really is cool?...
(I've created one doc type and one template - and its used to call multiple surface controller methods)
Unable to login using Custom login form
I have the site up and running and I'm able login to the Dashboard using the standard interface.
However, when I use a custom surface controller for the client-side to login (using the same username and p/w) - the following code(s) always return false:
as does
Even creating a new user through the Dashboard gives the same false value!
The values in Table umbracoUser are:
Also checked the logs and this is what I'm getting
2016-08-07 16:31:48,071 [P30252/D18/T96] WARN Umbraco.Web.UmbracoModule - Status code is 404 yet TrySkipIisCustomErrors is false - IIS will take over.
2016-08-07 16:31:55,483 [P30252/D18/T96] INFO
Umbraco.Core.Security.UmbracoMembershipProviderBase - Login attempt failed for username [email protected] from IP address ::1, the user does not exist
2016-08-07 16:32:02,691 [P30252/D18/T96] INFO
Umbraco.Core.Security.UmbracoMembershipProviderBase - Login attempt failed for username [email protected] from IP address ::1, the user does not exist
2016-08-07 16:32:16,181 [P30252/D18/T96] INFO
Umbraco.Web.Mvc.UmbracoPageResult - Executing Umbraco RouteDefinition controller
2016-08-07 16:32:16,262 [P30252/D18/T96] INFO
Umbraco.Web.Mvc.UmbracoPageResult - Finished (took 82ms)
2016-08-07 16:32:16,600 [P30252/D18/T64] WARN
Umbraco.Web.UmbracoModule - Status code is 404 yet TrySkipIisCustomErrors is false - IIS will take over.
Am I using the correct methods?...
You're trying to log in a Member.. while you're putting in the credentials of an Umbraco Backoffice User.
I'd need to look up how to log in a User exactly, but are you sure that's what you want? The same User that you're trying to log in can go to
/umbraco
and do whatever you allowed them to do.There are two types of authentications:
Users = Are users in backoffice (administrator etc.) Table: umbracoUser.
Members = Are members/user on the site Table: umbracoMember
https://our.umbraco.org/Documentation/Getting-Started/Data/Members/
Membership.Provider.ValidateUser and Members.Login does only validate members =)
Thanks guys!!
I thought that may have been the case - so I've now created a Client Register form which will create a new member!
Not sure if anything has changed recently as I've only used the latest version but I have the following tables:
UmbracoUser (Populated)
cmsMember (empty) suspect this is the problem
BTW - I done something which I think is pretty cool with Templates and Properties - is there anywhere I can show what I've done and see if it really is cool?...
(I've created one doc type and one template - and its used to call multiple surface controller methods)
Damn!!!
I can see the table cmsMember is now populated and the following returns a value:
However the following is ALWAYS false so never logs in!
Do I need to encode the password or will the method automatically do it?
How are you creating members?
Make sure to use the
MemberService
: https://our.umbraco.org/Documentation/Reference/Management/Services/MemberServiceExamples are available in snippets when you create new partial views in the backoffice.
I was trying to create server side using surface controller...
Yes, the code is still C#, it's just an example.. :-) Use it in your controllers!
Excellent - got Login and Registration working!!!
A very big Thank You!!!
is working on a reply...