-
Apr 4th, 2018, 11:20 PM
#1
Thread Starter
Hyperactive Member
Correct path?
Hello
My 'forgotten password' page does not send any email to the user which would otherwise contain a link tom reset the password. When the link is clicked, a new page, newPassword.aspx, should be displayed for the user to reset the password.
I am trying to identify why the email is not being sent. In my code, I have this:
Code:
If recordExists Then
Dim builder As New UriBuilder(Request.Url)
builder.Path = VirtualPathUtility.ToAbsolute("~/newPassword.aspx")
builder.Query = "uniqueCode=" & HttpUtility.UrlEncode(uniqueCode)
Dim link As String = builder.Uri.ToString()
Dim myMessage As New MailMessage
Dim Smtpserver As New SmtpClient
The file, newPassword.aspx in this code is taking a tilde, and I wonder if that is correct when both forgot.aspx and newPassword.aspx appear together (not in their own separate folders) in Solution Explorer:
It may be that I am barking up the wrong tree completely but as I say, I am attempting to identify the source of why the forgot.aspx page is not sending the email or launching newPassword.aspx.
Thanks.
-
Apr 5th, 2018, 03:20 AM
#2
Re: Correct path?
What is the url contained in the email? Does it look like it should be going to the correct page?
-
Apr 5th, 2018, 06:56 AM
#3
Re: Correct path?
Originally Posted by SteveHi
Hello
My 'forgotten password' page does not send any email to the user which would otherwise contain a link tom reset the password. When the link is clicked, a new page, newPassword.aspx, should be displayed for the user to reset the password.
I am trying to identify why the email is not being sent. In my code, I have this:
Code:
If recordExists Then
Dim builder As New UriBuilder(Request.Url)
builder.Path = VirtualPathUtility.ToAbsolute("~/newPassword.aspx")
builder.Query = "uniqueCode=" & HttpUtility.UrlEncode(uniqueCode)
Dim link As String = builder.Uri.ToString()
Dim myMessage As New MailMessage
Dim Smtpserver As New SmtpClient
Where's the rest of the code? That's only a part of it, and that part doesn't actually create or send the email...
Originally Posted by SteveHi
The file, newPassword.aspx in this code is taking a tilde, and I wonder if that is correct when both forgot.aspx and newPassword.aspx appear together (not in their own separate folders) in Solution Explorer:
It may be that I am barking up the wrong tree completely but as I say, I am attempting to identify the source of why the forgot.aspx page is not sending the email or launching newPassword.aspx.
Thanks.
It may or may not be right, but until the email is sent, we won't know. So for now, that's irrelevant.
-tg
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|