Hi there and thankyou for all the input so far.
I have don the below and it does:
1 x request where session time = 0 ( thus the user can do the call and get a responce.).
the should he request it again with the same session the it will tell him to do it again in 10 min.
if (Session["lastrequest"] == null)
Session["lastrequest"] = DateTime.Now;
DateTime d1 = (DateTime)Session["lastrequest"];
DateTime d2 = DateTime.Now;
TimeSpan ts = d2 - d1;
if (ts.TotalMinutes == 0)
{
Response.Write(Dogetdownload(Request.QueryString["getdownload"]));
}
else
{
Response.Write(" Wait 10 Min and open a new session.");
}
Tested and working well.
But this does not stop the user from opening a new session and do it all again.
Now I need to find a way to limit the user from accessing the system for 10 min after his last request.
The user will do the call:
http://website/javaweb.aspx?getdownload=Username,Password&retry=( 0 or 1 )
0 for new data and 1 for previous requesterd data.
On my search I have come to the conclusion that I will have to set a sever vairiable to set this using a set username / password.
Any sugestions on how to do this not using browser sessions and or any enries to a database ?