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. Make some web pages halt for a while?

Make some web pages halt for a while?

Scheduled Pinned Locked Moved ASP.NET
questionhelptutorial
6 Posts 2 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.
  • B Offline
    B Offline
    Blue_Skye
    wrote on last edited by
    #1

    How can i make some web pages from my web application halt for a while on a defined time (maybe from 10h to 10h10) and then works again. Besides, i don't know how to threat (response) if some people acess to that page on the halt time. Can you help me? Thanks!

    C 1 Reply Last reply
    0
    • B Blue_Skye

      How can i make some web pages from my web application halt for a while on a defined time (maybe from 10h to 10h10) and then works again. Besides, i don't know how to threat (response) if some people acess to that page on the halt time. Can you help me? Thanks!

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can set up some code in a base page class that refuses to process requests for a time, and in that time instead returns a warning. Christian Graus - Microsoft MVP - C++

      B 1 Reply Last reply
      0
      • C Christian Graus

        You can set up some code in a base page class that refuses to process requests for a time, and in that time instead returns a warning. Christian Graus - Microsoft MVP - C++

        B Offline
        B Offline
        Blue_Skye
        wrote on last edited by
        #3

        Can you give me a little more information. A base page class here means global.asax or the main control class in 3-tiers, and how can we coding to refuse the request, return a warning. I'm sorry, i used to work in Win App and ASP.NET is a brand new for me. I'm really need it to accomplish my project, can you help me. Thanks!

        C 1 Reply Last reply
        0
        • B Blue_Skye

          Can you give me a little more information. A base page class here means global.asax or the main control class in 3-tiers, and how can we coding to refuse the request, return a warning. I'm sorry, i used to work in Win App and ASP.NET is a brand new for me. I'm really need it to accomplish my project, can you help me. Thanks!

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          Blue_Skye wrote: A base page class here means global.asax or the main control class in 3-tiers It means you create a class derived from the Page class, and derive all your pages from that. Then all your pages have access to this method. I'm thinking if you put DateTime.Now into a session variable, then you can grab it, check it against the current time, and if the right amount of time has not elapsed, then you show your warning page, or put a warning on the current page. Have some sort of flag which all your other code will have to check to stop it doing any processing. Of course, processing WILL happen ( your server resources will be used ), but the user will not progress from where they are. Christian Graus - Microsoft MVP - C++

          B 1 Reply Last reply
          0
          • C Christian Graus

            Blue_Skye wrote: A base page class here means global.asax or the main control class in 3-tiers It means you create a class derived from the Page class, and derive all your pages from that. Then all your pages have access to this method. I'm thinking if you put DateTime.Now into a session variable, then you can grab it, check it against the current time, and if the right amount of time has not elapsed, then you show your warning page, or put a warning on the current page. Have some sort of flag which all your other code will have to check to stop it doing any processing. Of course, processing WILL happen ( your server resources will be used ), but the user will not progress from where they are. Christian Graus - Microsoft MVP - C++

            B Offline
            B Offline
            Blue_Skye
            wrote on last edited by
            #5

            i thinks that i'll add some code on the page load to check if time now is on the range from 10h to 10h5. If it is, i will redirect to a warning page. Is it ok? Thanks for your reply

            C 1 Reply Last reply
            0
            • B Blue_Skye

              i thinks that i'll add some code on the page load to check if time now is on the range from 10h to 10h5. If it is, i will redirect to a warning page. Is it ok? Thanks for your reply

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              You need to check the difference between now and a time you stored ( when you last allowed access ). Then it will work. Christian Graus - Microsoft MVP - C++

              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