ERROR: Item could not be saved when Creating User using Custom Membership Provider
As the title says I am getting an error message "ERROR: Item could not be saved." when creating a user using my Custom Membership Provider. The last method firing in the MembershipProvider is GetUser, which returns null, but CreateUser never fires. Part of the problem may well be that I haven't tested the MembershipProvider outside of Sitefinity, but I wanted to go ahead and post the question in case there is any direction you can give. I'm using a custom Role Provider which seems to be working, and I don't have a custom Profile Provider. Below is the Json that is getting passed to /Sitefinity/Services/Security/Users.svc/create/00000000-0000-0000-0000-000000000000/?provider=Unified
"UserName":"test","Password":"testtest","Email":"test@test.com","PasswordQuestion":"","PasswordAnswer":"","Comment":"","IsApproved":true,"RolesOfUser":[],"ProfileData":"\"Telerik.Sitefinity.Security.Model.SitefinityProfile\":\"__type\":\"Telerik.Sitefinity.Security.Model.SitefinityProfile\",\"FirstName\":\"test\",\"LastName\":\"test\",\"About\":null,\"PreferredLanguage\":null,\"Avatar\":null,\"Id\":\"99b3a368-2065-428f-bc9c-e18dc16ef0d8\",\"ApplicationName\":\"/UserProfiles\",\"LastModified\":\"/Date(1322707946386)/\",\"Owner\":\"00000000-0000-0000-0000-000000000000\",\"DateCreated\":\"/Date(1322707946386)/\",\"__providerName\":\"OpenAccessProfileProvider\""
I tested the MembershipProvider outside of Sitefinity using the standard MVC account view templates, and I was able to create a user without issue. I even was able to update the user from user administration in Sitefinity. Still when I go to create a user using my MembershipProvider in Sitefinity I get "ERROR: Item could not be saved." and CreateUser never fires. Error logs show me nothing outside of a missing resource that is occurring long before I get to the CreateUser page. Any help or direction you can provide would be much appreciated.
I was able to debug my MembershipProvider using the front end user registration control (don't know why I hadn't thought of that in the first place). I hadn't implemented the PasswordFormat property. So I'm all good now. Thanks.
Hello Joseph,
I'm glad that you solved your issue. If you have any further questions do not hesitate to contact us.
Greetings,Hi,
I am on sitefinity 6.3 and I having the same issue when saving data in the backend.
I used the default Sitefinity profile type for creating extra custom fields. but when i save, i get the same error "ERROR: Item could not be saved." the service method that is called is "/Sitefinity/Services/Security/Users.svc/update/42983c50-e743-6181-8145-ff00009c1862/?provider=Default"
Please also find attached the Log file with more detail.
See file...
Hello Adrien,
I am sorry to hear about the issue you experience.
The error you are getting when creating a new user might be related to a known issue that users with a valid GUID for their username can not be saved. The bug is logged in our feedback portal. Here is the link where you can track its progress and vote to increase its priority.
If this is not the case, can you please give some more details about the custom fields you have created for the basic profile type and the exact steps you take to create the user. This way we will be able to test it following your steps and check if the issue will be reproduced on our side.
Regards,
Sabrie Nedzhip
Telerik