Re: Expire Email Hyperlink

Discussion in 'ASP .Net' started by Craig Deelsnyder, Jul 15, 2004.

  1. Jon wrote:
    > Hi All,
    >
    > I have an app that send a hyperlink via email to allow users to get to a certion webform...
    >
    > mmMail.Body = "http://localhost/MyApp/Secure/GoHere.aspx?" & sParams
    >
    > Is there a way to add code to my sParams (parameters) so that the link will expire after a certain time period? In other words, after the link has been emailed, if a user doesn't click on it in 5 days, the link will no longer send them to the page, and thus be rendedred useless. I may be dreaming, but I thought I read the answer to this several weeks ago in this newsgroup.
    >
    >
    >
    >

    Just add your own querystring arg that is based on the server time.
    Just hash it together, etc. so it's cryptic to the user and they don't
    know how to 'munge' it. Then GoHere.aspx needs to check if the
    timestamp pulled out of the querystring is within your expiration period...

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Jul 15, 2004
    #1
    1. Advertising

  2. Craig Deelsnyder

    wl Guest

    Or you could create a GUID (or any other "random' value) and append this to
    the URL as GET parameter (such as: http://mydomain/test?id=37128937192) that
    you include in the email. Store this number in a database together with the
    date the mail was sent.

    When the link is visited, do a reverse lookup.

    Wim

    "Craig Deelsnyder" <cdeelsny@NO_SPAM_4_MEyahoo.com> wrote in message
    news:%23m$...
    > Jon wrote:
    > > Hi All,
    > >
    > > I have an app that send a hyperlink via email to allow users to get to a

    certion webform...
    > >
    > > mmMail.Body = "http://localhost/MyApp/Secure/GoHere.aspx?" & sParams
    > >
    > > Is there a way to add code to my sParams (parameters) so that the link

    will expire after a certain time period? In other words, after the link has
    been emailed, if a user doesn't click on it in 5 days, the link will no
    longer send them to the page, and thus be rendedred useless. I may be
    dreaming, but I thought I read the answer to this several weeks ago in this
    newsgroup.
    > >
    > >
    > >
    > >

    > Just add your own querystring arg that is based on the server time.
    > Just hash it together, etc. so it's cryptic to the user and they don't
    > know how to 'munge' it. Then GoHere.aspx needs to check if the
    > timestamp pulled out of the querystring is within your expiration

    period...
    >
    > --
    > Craig Deelsnyder
    > Microsoft MVP - ASP/ASP.NET
    wl, Jul 16, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Imran Aziz

    Expire email after 24 hours.

    Imran Aziz, Sep 19, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    2,396
    Imran Aziz
    Sep 19, 2005
  2. Imran Aziz
    Replies:
    0
    Views:
    463
    Imran Aziz
    Sep 23, 2005
  3. davetichenor
    Replies:
    1
    Views:
    819
    Eliyahu Goldin
    Oct 30, 2006
  4. Ken
    Replies:
    1
    Views:
    370
    Alvin Bruney
    Aug 16, 2003
  5. Tongass Park Neighborhood Association, Juneau Alas

    Cookies expire immediately, not when set to expire

    Tongass Park Neighborhood Association, Juneau Alas, Oct 1, 2009, in forum: ASP General
    Replies:
    2
    Views:
    1,198
    SQLDude
    Nov 24, 2009
Loading...

Share This Page