Reg Widget for AspNetSqlMembership & Registration Email

Posted by Community Admin on 04-Aug-2018 18:56

Reg Widget for AspNetSqlMembership & Registration Email Error

All Replies

Posted by Community Admin on 12-May-2014 00:00

I have successfully created a registration widget that inherits from RegistrationForm such that I can continue to use a legacy user list currently in a AspNetSqlMembershipProvider database. 

 The provider was configured per and has been working like a champ; the registration widget works properly in terms of adding users to the system, but I am running into an issue when I attempt to use the Registration Confirmation/Activation widget.

Specifically, I see this error when the system attempts to send out the email:

[ArgumentNullException: Value cannot be null.
Parameter name: from]
   System.Net.Mail.MailMessage..ctor(String from, String to) +2594374
   Telerik.Sitefinity.Web.Mail.EmailSender.CreateRegistrationConfirmationEmail(String confirmationEmailAddress, String userEmailAddress, String userName, String confirmationPageUrl, String subject, String body) +51
   Telerik.Sitefinity.Security.Web.UI.RegistrationForm.SendRegistrationConfirmationEmail(User user, UserManager userManager) +1356
   SitefinityWebApp.ucCS_RegistrationAlumni.SendRegistrationConfirmationEmail(User user, UserManager userManager) in e:\Visual Studio Projects\Career Services - CS Website (SiteFinity)\7.0.5100\SitefinityWebApp\UserControls\ucCS_RegistrationAlumni.cs:409
   Telerik.Sitefinity.Security.Web.UI.RegistrationForm.RegisterButton_Click(Object sender, EventArgs e) +530
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +155
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3804

The registration widget does have the correct page specified for the activation widget, but I do not seem to be able to set the proper "from" address for my AspNetSqlMembership provider.  I have seen the notes about manually adding successfulRegistrationEmailAddress to the advanced settings, but this particular provider does not appear there due to how it's primarily configured in web.config, but even manually overriding SendRegistrationConfirmationEmail and setting EmailSenderName still throws this error.

Is there a way to set the address for the procedure that I am just overlooking in the documentation?  I really would like to use the built-in activation process instead of writing something.  Thanks!




Posted by Community Admin on 14-May-2014 00:00

Hello Christopher,

Try the following declaration in <appSettings>:

    <add key="AspNetSqlMembershipProvider_RecoveryMailAddress" value=""/>
    <add key="TestLocalization" value="false" />
    <add key="enableSimpleMembership" value="false"/>

The key is constructed from AspNetSqlMembershipProvider(name of the provider) and_RecoverMailAddress key. Take a look below for reference:

I hope this helps.

Pavel Benov
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

This thread is closed