ASP.NET auto generating unique pages that have a lifespan

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.
Who is Participating?
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

gczAuthor Commented:
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.