ASP.NET auto generating unique pages that have a lifespan

Posted on 2011-10-03
Last Modified: 2012-05-12
Hi Experts

I need to develope a system, where by at the start of every month, an email is sent out to every client. In that email, will exist a unique URL. The client can click on the link and go straight to a grid tool that we already have partly developed (allowing them to manipulate tracked data etc). At the end of the month, the link will no longer work and a new email will be sent. The idea is to not have the user enter a password or username, ever.

I am sure this is possible in ASP.NET. But I don't know how, 'exactly', hence asking here. I wonder if anyone has any examples of something like this already in action or some advice on how to go about developing this.

Thanks for any assistance.
Question by:gcz
    LVL 9

    Accepted Solution

    Hello gcz

    Do you know how to send the E-Mails?

    Regarding the link in the emails, have a token parameter for each link which will only be valid for that month and will contain the user id etc.... On the page that the link is pointing to, have it decode the token to check the month, user id etc...

    Here is some sample code which can do that:


    Richard Hughes
    int userId = 56812;
    			DateTime month = DateTime.Now;
    			month.AddMonths(1); // set the link to only work for next month
    			// you may want to encrypt the token a bit more than this
    			// see these urls for some possible ways depending on your needs:
    			string token = String.Format("UserId={0}&Date={1}", userId, month);
    			token = Convert.ToBase64String(ASCIIEncoding.ASCII.GetBytes(token));
    			string url = String.Format("{0}", token);

    Open in new window

    LVL 1

    Author Comment

    Many thanks, I haven't got to the stage of learning how to send the emails yet. Unfortunately, I need to start learning asp from the ground up. I've done similar in PHP before though, so imagin sending the email wont be that hard.

    Your response has let me know that this is more than a managable project.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    I have developed many web applications with asp & and to add and use a dropdownlist was always a very simple task, but with the new, setting the value is a bit tricky and its not similar to the old traditional method. So in this a…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now