Custom Membership Provider

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 năm cách đây
I can't seem to find much in the way of documentation on custom providers with nopCommerce, specifically membership providers and was wondering if anyone can offer any guidance please?

I have a membership provider for an existing site with a few thousand members, I can plug this provider in and people can sign into the shop it seems with no problem however the problem occurs when new customers try to register an exception is thrown by the CustomerRegisterControl.

Object reference not set to an instance of an object. 
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 253:            {
Line 254:                if (rbGenderM.Checked)
Line 255:                    customer.Gender = "M";
Line 256:                else
Line 257:                    customer.Gender = "F";


Source File: D:\NopCommerceStore\Modules\CustomerRegister.ascx.cs    Line: 255

Stack Trace:


[NullReferenceException: Object reference not set to an instance of an object.]
   NopSolutions.NopCommerce.Web.Modules.CustomerRegisterControl.CreatedUser(Object sender, EventArgs e) in D:\NopCommerceStore\Modules\CustomerRegister.ascx.cs:255
   System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +461
   System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +225
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +585
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +51
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3690




--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
13 năm cách đây
I've been doing a little further investigation on this and it seems that there is either no email or a blank string being passed in place of the email address to the custom providers CreateUser method, I am yet to work out why.
13 năm cách đây
see this:

https://www.nopcommerce.com/boards/t/2307/aspnet-integrated-membership.aspx

https://www.nopcommerce.com/boards/t/3238/account-migration-from-aspnet-membership-specifically-dashcommerce.aspx

https://www.nopcommerce.com/boards/t/6999/aspnet-membership.aspx

https://www.nopcommerce.com/boards/t/3377/where-is-the-role-and-membership-information-stored.aspx
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.