开发者

CreateUserWizard's LoginCreatedUser=false and email sending doesn't work

开发者 https://www.devze.com 2023-02-16 19:07 出处:网络
In CreateUserWizard I have set: DisableCreatedUser=\"True\" LoginCreatedUser=\"False\" but the user is logged on after it is created.

In CreateUserWizard I have set:

DisableCreatedUser="True" 
LoginCreatedUser="False"

but the user is logged on after it is created.

and also for sending a verification email I have added:

   <MailDefinition BodyFileName="~/EmailTemplates/NewAccountTempl开发者_开发问答ate.htm" From="info@test.com" IsBodyHtml="True" Subject="Registration">
   </MailDefinition>

but no email is sent and even OnSendingMail is not fired.

Please help me.


The problem was this default code in Register.aspx.cs

formsauthentication.setauthcookie(registeruser.username, false /* createpersistentcookie */);
string continueurl = registeruser.continuedestinationpageurl;
if (string.isnullorempty(continueurl))
{
   continueurl = "~/";
}
response.redirect(continueurl);
0

精彩评论

暂无评论...
验证码 换一张
取 消