Password recovery problems

Discussion in 'Visual Studio' started by LorJay, Jun 11, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hello there,

    I cant seem to get the password recovery feature to work in vwd express. I was hoping sommeone could point me in the right direction. I have included my code from my web.config and the error msg. The other login stuff works great. I can change password, login etc.... Thanks for looking

    Jason



    membership>
    <providers>
    <remove name='AspNetSqlMembershipProvider'/>
    <add name='AspNetSqlMembershipProvider' type='System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,

    PublicKeyToken=b03f5f7f11d50a3a' connectionStringName='LocalSqlServer'
    applicationName='/'
    enablePasswordReset='true'
    enablePasswordRetrieval='false'
    maxInvalidPasswordAttempts='10'
    minRequiredPasswordLength='5'
    minRequiredNonalphanumericCharacters='0'
    passwordAttemptWindow='10'
    passwordStrengthRegularExpression=''
    passwordFormat='Encrypted'
    requiresQuestionAndAnswer='false'
    requiresUniqueEmail='true'/>
    </providers>
    </membership>




    </system.web>
    <system.net>
    <mailSettings>
    <smtp from='[email protected]'>
    <network host='smtp.myrebateclub.com' password='Password' userName='myrebateclu' />
    </smtp>
    </mailSettings>
    </system.net>
    </configuration>







    Server Error in '/' Application.
    The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication needed
    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.Net.Mail.SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication needed

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [SmtpException: The SMTP server requires a secure connection or the client was not authenticated. The server response was: authentication needed]
    System.Net.Mail.MailCommand.CheckResponse(SmtpStatusCode statusCode, String response) +822520
    System.Net.Mail.MailCommand.Send(SmtpConnection conn, Byte[] command, String from) +39
    System.Net.Mail.SmtpTransport.SendMail(MailAddress sender, MailAddressCollection recipients, String deliveryNotify, SmtpFailedRecipientException& exception) +95
    System.Net.Mail.SmtpClient.Send(MailMessage message) +2004
    System.Web.UI.WebControls.LoginUtil.SendPasswordMail(String email, String userName, String password, MailDefinition mailDefinition, String defaultSubject, String defaultBody, OnSendingMailDelegate onSendingMailDelegate, OnSendMailErrorDelegate onSendMailErrorDelegate, Control owner) +341
    System.Web.UI.WebControls.PasswordRecovery.AttemptSendPasswordUserNameView() +664
    System.Web.UI.WebControls.PasswordRecovery.AttemptSendPassword() +52
    System.Web.UI.WebControls.PasswordRecovery.OnBubbleEvent(Object source, EventArgs e) +101
    System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
    System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +115
    System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +163
    System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7
    System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11
    System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5102
     
  2. Bruce

    Bruce DiscountASP.NET Staff

    Change to

    </system.web>
    <system.net>
    <mailSettings>
    <smtp from="[email protected]">
    <network host="localhost"/>
    </smtp>
    </mailSettings>
    </system.net>
    </configuration>


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  3. Hello Again,

    It worked no more errors!, But no Password by mail.... here is my web.config I am sorry to keep posting. One day I will return the favor. Thank you again... Jason


    <membership>
    <providers>
    <remove name='AspNetSqlMembershipProvider'/>
    <add name='AspNetSqlMembershipProvider' type='System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,

    PublicKeyToken=b03f5f7f11d50a3a' connectionStringName='LocalSqlServer'
    applicationName='/'
    enablePasswordReset='true'
    enablePasswordRetrieval='true'
    maxInvalidPasswordAttempts='10'
    minRequiredPasswordLength='5'
    minRequiredNonalphanumericCharacters='0'
    passwordAttemptWindow='10'
    passwordStrengthRegularExpression=''
    passwordFormat='Clear'
    requiresQuestionAndAnswer='false'
    requiresUniqueEmail='false'/>
    </providers>
    </membership>




    </system.web>
    <system.net>
    <mailSettings>
    <smtp from='[email protected]'>
    <network host='localhost' />
    </smtp>
    </mailSettings>
    </system.net>
    </configuration>
     
  4. Is it that you are not receiving an email?Are you using the password recovery control along with the membership provider?
    You web.config membership provider section looks fine.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  5. Hi again , I am still not getting any emails from my site. I think its mad at me :)


    Here is my ForgotPassword.aspx

    <%@ Page Language='VB' MasterPageFile='~/MasterPage.master' Title='Untitled Page' %>
    <asp:Content ID='Content1' ContentPlaceHolderID='ContentPlaceHolder1' Runat='Server'>
    <asp:passwordRecovery ID='PasswordRecovery1' runat='server'>
    <MailDefinition From='[email protected]' IsBodyHtml='True' Priority='High'
    Subject='Your New Temporary Password'>
    </MailDefinition>
    </asp:passwordRecovery>
    </asp:Content>





    *******************WEB.CONFIG***************************

    <membership>
    <providers>
    <remove name='AspNetSqlMembershipProvider'/>
    <add name='AspNetSqlMembershipProvider' type='System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral,

    PublicKeyToken=b03f5f7f11d50a3a' connectionStringName='LocalSqlServer'
    applicationName='/'
    enablePasswordReset='true'
    enablePasswordRetrieval='true'
    maxInvalidPasswordAttempts='10'
    minRequiredPasswordLength='5'
    minRequiredNonalphanumericCharacters='0'
    passwordAttemptWindow='10'
    passwordStrengthRegularExpression=''
    passwordFormat='Clear'
    requiresQuestionAndAnswer='false'
    requiresUniqueEmail='true'/>
    </providers>
    </membership>




    </system.web>
    <system.net>
    <mailSettings>
    <smtp from='[email protected]'>
    <network host='localhost' />
    </smtp>
    </mailSettings>
    </system.net>
    </configuration>


    I am not geeting an email from the server. I know I am doing something stupid.
     
  6. On your forgotpassword.aspx, I do not see the To address. Can you verify if you have included this in your coding?
     
  7. Bruce

    Bruce DiscountASP.NET Staff

    What is the address you are trying to send to? ie. the email address of the lost password user?

    I don't think this is a problem w/ the code or setting because you are not getting any error.

    Try use another address to eliminate email delivery problem. If all else fails, create a support ticket and they can look into the log for you.


    Bruce

    DiscountASP.NET
    www.DiscountASP.NET
     
  8. Hi Guys

    Sorry for using up so much time.

    I do not have a to address, can someone show me some sample code to possibly use?
    I thought the control automatically looked up address to send to.

    I am sorry for being such a newbie.

    Jason

    PS I will also send as a ticket
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page