Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Only 10 user can visit my Webite at a time

Only 10 user can visit my Webite at a time

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelptutorial
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    salman_syed_01
    wrote on last edited by
    #1

    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# ).

    A A A 3 Replies Last reply
    0
    • S salman_syed_01

      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# ).

      A Offline
      A Offline
      Ashfield
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • S salman_syed_01

        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# ).

        A Offline
        A Offline
        Abhijit Jana
        wrote on last edited by
        #3

        Yes, I think There is a way. You can try to implement it using Global.asax file. In Global.asax file, there is a method Session_Start() here you just use a variable to count the number of session, because for 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 !!! :-D

        cheers, Abhijit

        1 Reply Last reply
        0
        • S salman_syed_01

          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# ).

          A Offline
          A Offline
          AhsanS
          wrote on last edited by
          #4

          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

          A 1 Reply Last reply
          0
          • A AhsanS

            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

            A Offline
            A Offline
            Abhijit Jana
            wrote on last edited by
            #5

            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

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups