how to send website visitors to a holding page if over a certain amount
-
Hi all, I'm looking at creating a system on our website to redirect abnormally large volumes of visitors to a holding page to limit the amount of bandwidth being used to keep our website working at a reasonable speed (The holding page would use virtually no bandwidth and would auto refresh to check if they can gain access yet or not). What I'm after is to say if there are more than say 800 connections to the website, those over the 800 get assigned a queue number and sent to a holding page until a connection is free. I had an idea to do it with Application variables and sessions, ie: on Session_Start Application["CurrentConnCount"] = itself + 1 on Session_End Application["CurrentConnCount"] = itself - 1 However, the Session_End event can't be relied upon to be fired if a session just times out. Is there another way I can do this, it all sounded nice and easy in my head, but the execution is currently eluding me. I know I can limit the number of connections using iis, but this returns 'Service is Unavailable' and does not care if someone is in the middle of a transaction or not so isn't suitable. Can I look at the number of current connections to the website using .net, rather than relying on events that may or may not be fired? Thanks in advance for any help, I hope that all made sense and I'm not talking complete jibberish...