locked
Block aspx specific url after a specific time RRS feed

  • Question

  • User585256990 posted

    Hi ,

    I wish to block specific pages in my application after say about 6pm and open them the next day after 9 am.

    I wish to do this via IIS / or Config or some other methods other than hard-coding these conditions in C# code. 

    Can you help me?

    Abraham

    Tuesday, July 19, 2016 4:00 AM

Answers

  • User-2057865890 posted

    Hi Abraham,

    You could use js or Deny URL Sequences <denyUrlSequences>.

    $(document).ready(function () {
          var today = new Date();
          var h = today.getHours();
          if (h > 18 || h < 9) {
              window.open("http://forums.asp.net");
          }
    })

    Best Regards,

    Chris

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, July 20, 2016 6:15 AM