Only 10 user can visit my Webite at a time
-
I am developing a Website portal using ASP.Net ( C# ). I want to restrict the number of users to 10 who are accessing my website simultaneously. If 11th user want to access the website then it should prompt to user that "Website is too busy while processing request". When one of the 10 users leave the website then another user can visit that website. Please help me in this regards how to implement this technique using ASP.Net ( C# ).
-
I am developing a Website portal using ASP.Net ( C# ). I want to restrict the number of users to 10 who are accessing my website simultaneously. If 11th user want to access the website then it should prompt to user that "Website is too busy while processing request". When one of the 10 users leave the website then another user can visit that website. Please help me in this regards how to implement this technique using ASP.Net ( C# ).
I doubt if anything will be reliable as you need to take into account the browser back button, user simply leaving the browser on your page, session timeout etc etc. It does beg the question as to why you only want 10 users at a time, but I guess thats up to you :)
Bob Ashfield Consultants Ltd
-
I am developing a Website portal using ASP.Net ( C# ). I want to restrict the number of users to 10 who are accessing my website simultaneously. If 11th user want to access the website then it should prompt to user that "Website is too busy while processing request". When one of the 10 users leave the website then another user can visit that website. Please help me in this regards how to implement this technique using ASP.Net ( C# ).
Yes, I think There is a way. You can try to implement it using
Global.asax
file. In Global.asax file, there is a methodSession_Start()
here you just use a variable to count the number of session, becausefor first request one session will be created
, so you just count number of seesion, if count==11 , just in page load of your application send what ever message you want to so !!! This will solve your problem !!! :-Dcheers, Abhijit
-
I am developing a Website portal using ASP.Net ( C# ). I want to restrict the number of users to 10 who are accessing my website simultaneously. If 11th user want to access the website then it should prompt to user that "Website is too busy while processing request". When one of the 10 users leave the website then another user can visit that website. Please help me in this regards how to implement this technique using ASP.Net ( C# ).
What abhijit has said is correct and it should solve your problem. But can you please explain why do you want to restrict number of users? I don't think it is a good option as they won't feel happy and ultimately won't visit your site again. If it is because of performance then i must say you should try to improve the design of site rather then restricting users.
Ahsan Ullah Senior Software Engineer
-
What abhijit has said is correct and it should solve your problem. But can you please explain why do you want to restrict number of users? I don't think it is a good option as they won't feel happy and ultimately won't visit your site again. If it is because of performance then i must say you should try to improve the design of site rather then restricting users.
Ahsan Ullah Senior Software Engineer
AhsanS wrote:
If it is because of performance
I dont think it only because of the performance. because 10 user is too less for any web application. may be reason is other .
cheers, Abhijit