I am trying to create a forgot password section within my login section and it doesnt seem to work.
In my forgotpassword.aspx page my code looks like this:
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> <asp:PasswordRecovery ID="PasswordRecovery1" runat="server" Height="224px" Width="295px" SubmitButtonText="Get Password" SubmitButtonType="Link"> <MailDefinition From="email@example.com" Subject="Your new password" BodyFileName="PasswordRecovery.txt" /> </asp:PasswordRecovery> </asp:Content>
In my webconfig page the code looks like this:
<system.net> <mailSettings> <smtp from="firstname.lastname@example.org"> <network host="localhost" password="password" userName="username" /> </smtp> </mailSettings> </system.net>
I then have created a text file which is called PasswordRecovery.txt and looks like this:
Your password has been reset, <%UserName%>!
According to our records, you have requested that your password be reset. Your new
password is: <%Password%>
If you have any questions or trouble logging on please contact a site administrator.
The error which I am receiving is:
No connection could be made because the target machine actively refused it ::1:25
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.Sockets.SocketException: No connection could be made because the target machine actively refused it ::1:25
Could anyone help me in this situation?