Membership wrapper

Posted by Community Admin on 03-Aug-2018 00:03

Membership wrapper

All Replies

Posted by Community Admin on 30-Apr-2011 00:00

I'm having a major issue with the Membership wrapper.

First, at initial login, the membership wrapper calls GetAllUsers().  This seems like a big performance issue, imho, when I have a user base of over 10,000.

Second, and this is the MAJOR problem.  Apparently, the wrapper attempts to convert the ProviderUserKey to a GUID for some reason in the UserWrapper.CopyFrom method.  My ProviderUserKey is not a Guid, and it's not required to be a Guid by the Membership provider model.  Is there any work-around for this?  This is a major show-stopper for me.

[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) +221
   Telerik.Sitefinity.Security.MembershipProviderWrapper.GetUsers() +271
   Telerik.Sitefinity.Security.Web.UI.LoginForm.InitializeProvidersList() +665
   Telerik.Sitefinity.Security.Web.UI.LoginForm.CreateChildControls() +93
   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() +58
   Telerik.Sitefinity.Security.Web.UI.LoginForm.UpdateVisibilityOfLinks() +193
   Telerik.Sitefinity.Security.Web.UI.LoginForm.set_ShowChangePasswordLink(Boolean value) +102
   Telerik.Sitefinity.Web.LoginRouteHandler.SetLoginLogoutFroms(Page handler, RequestContext requestContext, String view) +665
   Telerik.Sitefinity.Web.LoginRouteHandler.InitializeHttpHandler(Page handler, RequestContext requestContext) +303
   Telerik.Sitefinity.Web.RouteHandlerBase.Handler_PreInit(Object sender, EventArgs e) +306
   System.Web.UI.Page.OnPreInit(EventArgs e) +8897726
   System.Web.UI.Page.PerformPreInit() +31
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +328

Posted by Community Admin on 04-May-2011 00:00

Hi Stephen Long,

The problem with the GUID is that internally our User object uses a GUID as Id property so we have to count on the fact that the ProviderUserKey is a GUID as well. The only solution we could come up with is to convert the Key to a GUID via some algorithm like MD5. We will investigate the possibilities and will try to find a workaround for this problem.

Kind regards,
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

Posted by Community Admin on 21-Feb-2012 00:00

Hi,

Is there any update to this? I too have implemented my own membership provider with 20K users, is there not a way to configure Sitefinity to page the users. The GetAllUsers method is designed for paging.

Also, I too have users which are not keyed by GUID, I was think of creating a Cache of key to GUID everytime I get a user by username. How did you solve this problem in the end?

Thanks,

Stu

Posted by Community Admin on 01-Oct-2012 00:00

I'm also looking for an update to this as I've just found the same 2 problems when implementing a customer provider.

I've got the error converting to a GUID which is an annoyance but I can work around it but I'm more worried about calling GetAllUsers on login.  In some of our deployments we could be talking about huge numbers of users returned by the GetAllUsers method. I can't understand why this method is being called to process a login.

Posted by Community Admin on 01-Oct-2012 00:00

Sorry - double post and I can't seem to delete this 2nd reply.

This thread is closed