Reg Widget for AspNetSqlMembership & Registration Email Error
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 http://www.sitefinity.com/blogs/slavoingilizov/posts/slavo-ingilizovs-blog/2011/04/20/using_the_asp_net_sql_membership_provider_in_sitefinity 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!
Hello Christopher,
Try the following declaration in <appSettings>:
<
appSettings
>
<
add
key
=
"AspNetSqlMembershipProvider_RecoveryMailAddress"
value
=
"testemail@mail.com"
/>
<
add
key
=
"TestLocalization"
value
=
"false"
/>
<
add
key
=
"enableSimpleMembership"
value
=
"false"
/>
</
appSettings
>