+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / ERROR: Item could not be saved when Creating User using Custom Membership Provider

ERROR: Item could not be saved when Creating User using Custom Membership Provider

7 posts, 0 answered
  1. Apptain
    Apptain avatar
    30 posts
    Registered:
    20 Aug 2012
    01 Dec 2011
    Link to this post
    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\"}}"}
  2. Apptain
    Apptain avatar
    30 posts
    Registered:
    20 Aug 2012
    01 Dec 2011
    Link to this post
    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.
  3. Apptain
    Apptain avatar
    30 posts
    Registered:
    20 Aug 2012
    02 Dec 2011
    Link to this post
    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.
  4. Lubomir Velkov
    Lubomir Velkov avatar
    688 posts
    Registered:
    03 Nov 2014
    05 Dec 2011
    Link to this post
    Hello Joseph,

    I'm glad that you solved your issue. If you have any further questions do not hesitate to contact us.

    Greetings,
    Lubomir Velkov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Adrien
    Adrien avatar
    7 posts
    Registered:
    28 Jul 2010
    11 Jun 2014
    Link to this post

    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.

     

  6. Adrien
    Adrien avatar
    7 posts
    Registered:
    28 Jul 2010
    11 Jun 2014 in reply to Adrien
    Link to this post

    See file...

  7. Sabrie Nedzhip
    Sabrie Nedzhip avatar
    534 posts
    Registered:
    02 Dec 2016
    16 Jun 2014
    Link to this post
    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
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
7 posts, 0 answered