Does timer in Web Service Global.asax block my Web Service from processing web-site requests?

Discussion in 'ASP .Net Web Services' started by Leo Violette, Apr 17, 2009.

  1. Leo Violette

    Leo Violette Guest

    My Web Service has a Global.asax.cs file. In my Global class, I have a
    Timer member called PollingTimer.

    In Application_Start, I construct the polling timer and have it run every 30
    seconds. The reason I do this is because
    I want to report the status of some server machines on my web-site. But, if
    I query the machine every time the web-site
    requests it, it would make the request take too long. So, I have this
    polling timer make the request every 30 seconds,
    which I then store in the ApplicationState and when the Web-Site requests
    the information from my service, I just
    retrieve it from ApplicationState and return it back to the web-site.

    Feel free to comment if you think that is a bad way to solve the problem.

    But, my question is this:
    When my timer fires and queries a remote server for status, is that blocking
    my Web Service from receiving and
    processing requests from the Web Site? If so, then does that mean that
    instead of a timer, I should use a separate thread?

    Thanks for your input.
    Leo.
     
    Leo Violette, Apr 17, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?YmNoYXJsZXM=?=

    global.asax and global.asax.cs

    =?Utf-8?B?YmNoYXJsZXM=?=, Oct 4, 2004, in forum: ASP .Net
    Replies:
    5
    Views:
    866
    =?Utf-8?B?YmNoYXJsZXM=?=
    Oct 5, 2004
  2. Mark Rae

    System.Timers.Timer in Global.asax

    Mark Rae, Feb 3, 2005, in forum: ASP .Net
    Replies:
    10
    Views:
    10,450
    ehosca
    May 31, 2009
  3. Ben Fidge

    Setting up a timer in Global.asax

    Ben Fidge, Feb 26, 2006, in forum: ASP .Net
    Replies:
    2
    Views:
    3,297
    =?Utf-8?B?QmVuIEZpZGdl?=
    Feb 27, 2006
  4. Mark Rae

    Global.asax / Global.asax.cs in v2

    Mark Rae, May 23, 2006, in forum: ASP .Net
    Replies:
    6
    Views:
    3,188
    Mark Rae
    May 23, 2006
  5. rgparkins
    Replies:
    2
    Views:
    1,693
    rgparkins
    Jul 26, 2006
Loading...

Share This Page