Last post Sep 20, 2012 01:27 PM by ProgMaster
Sep 20, 2012 10:49 AM|ProgMaster|LINK
Hi All, some sites email users their passwords and a link to a page to change their password or activate their account if they make a request to do so. What I would like to know is how those really long links are created; they are not short like http:somesite.com/activateaccount.aspx
but are long like
http://www.somesite.com/accountactivation.aspx?app=core&module=global§ion=lostpass&do=sendform&uid=36308&aid=67b2f40abcd35602b422103c407443d4 . Also the links take users to a page that normally requires
them to first login in order to have access. How is the login requirement overridden? Thanks in advance for your reply.
Sep 20, 2012 11:04 AM|Ramesh Chandra|LINK
once user clicks on activate account or reset password, you have to send a link for activation/reset password with a guid to user registered email address, that guid you ahve to store in the database. Once user click on the link and come back to your account
activation/ password reset page, you can verify guid and email address and reset/activate account without asking to login or old password.
Sep 20, 2012 12:03 PM|ProgMaster|LINK
Hi, thanks for replying. How do I append the GUID to a page called changepassword.aspx and make it work like a link? That is the only concern I have at the moment. Thanks again for replying
Sep 20, 2012 12:15 PM|Ramesh Chandra|LINK
once you generate guid and store that in database. send an email to the user registered email address. that email will contain a link for your changepassword.aspx page. like this.
<a href="changepassword.aspx?activatekey="xxxx-xxxxxx-xxxx-x-xxx-">Click here to Activate your account</a>
replace xxxxx-xxxx-xx with your guid. on changepassword.aspx page extract activatekey from query string and validate key with the user.
Sep 20, 2012 01:27 PM|ProgMaster|LINK
Hi, thanks again for replying. So in my email I send the link with xxxx-xxxxxx-xxxx-x-xxx replaced by a GUID like the following:
<a href="changepassword.aspx?activatekey="sendform&uid=36308&aid=67b2f40abcd35602b422103c407443d4">Click here to Activate your account</a>
Then inside the changepassword.aspx page I extract the activatekey. To do this I think I can use Request.QueryString property like the following:
Please comment if I'm missing a step or two, thanks in advance.