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

Forums / Bugs & Issues / Custom membershipprovider without Guid

Custom membershipprovider without Guid

4 posts, 0 answered
  1. El Barto
    El Barto avatar
    42 posts
    Registered:
    28 Apr 2008
    13 May 2011
    Link to this post
    I'm using Sitefinity 4.1. I'm writing my own custom asp.net membership provider with an existing database. This existing database doesn't have a Guid for identifying each record. I just implemented the GetallUsers method. When I return an empty MembershipUserCollection it works. If return a filled MembershipUserCollection I get an exception on the login page: 
    [FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).]
       System.Guid.TryParseGuidWithNoStyle(String guidString, GuidResult& result) +3916597
       System.Guid.TryParseGuid(String g, GuidStyles flags, GuidResult& result) +245
       System.Guid.Parse(String input) +73
       Telerik.Sitefinity.Security.UserWrapper.CopyFrom(MembershipUser user, String applicationName) +140
       Telerik.Sitefinity.Security.MembershipProviderWrapper.GetUsers() +196
       Telerik.Sitefinity.Security.Web.UI.LoginForm.InitializeProvidersList() +366
       Telerik.Sitefinity.Security.Web.UI.LoginForm.CreateChildControls() +116
       System.Web.UI.Control.EnsureChildControls() +102
       System.Web.UI.Control.FindControl(String id, Int32 pathOffset) +20
       System.Web.UI.Control.FindControl(String id) +12
       Telerik.Sitefinity.Security.Web.UI.LoginForm.get_ChangePasswordLink() +30
       Telerik.Sitefinity.Security.Web.UI.LoginForm.UpdateVisibilityOfLinks() +121
       Telerik.Sitefinity.Security.Web.UI.LoginForm.set_ShowChangePasswordLink(Boolean value) +60
       Telerik.Sitefinity.Web.LoginRouteHandler.SetLoginLogoutFroms(Page handler, RequestContext requestContext, String view) +289
       Telerik.Sitefinity.Web.LoginRouteHandler.InitializeHttpHandler(Page handler, RequestContext requestContext) +202
       Telerik.Sitefinity.Web.RouteHandlerBase.Handler_PreInit(Object sender, EventArgs e) +199
       System.Web.UI.Page.OnPreInit(EventArgs e) +8897726
       System.Web.UI.Page.PerformPreInit() +31
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328
    

    I'd gues the Sitefinity security wrapper expects the ProviderUserKey to be a Guid which isn't the case. Or am I doing something wrong here?
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 May 2011
    Link to this post
    Hello El Barto,

    Yes, we expect guids. You can create some Guid mapper in your custom database, so you can use your users with Sitefinity.

    Kind regards,
    Ivan Dimitrov
    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
  3. El Barto
    El Barto avatar
    42 posts
    Registered:
    28 Apr 2008
    13 May 2011
    Link to this post
    Hi Ivan,

    Thanks for the response.
    I'm sure Telerik has it's reasons for choosing only to support Guid's but it limits the flexibility of the membershipprovider. I think that's unfortunate.

    Regards,

    Bart
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    13 May 2011
    Link to this post
    Hi El Barto,

    In the SqlMembershipProvider the unique identifier is also supposed to be a guid or you should cast the value to guid.

    Greetings,
    Ivan Dimitrov
    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
4 posts, 0 answered