Global application function asp.net

Discussion in 'ASP .Net' started by Matt, Jul 3, 2007.

  1. Matt

    Matt Guest

    Hi,

    I am writing a web appplication that will use a global licensing
    paradigm. For every instance of the server I want to check the
    licensing requirements i.e the application in a global context. I've
    read that using the Application_Startup event in HttpApplication class
    is useless because an application does not map to an instance of the
    webapp - i.e that method could be called more than once as more
    httpApplication instances are created to handle request from the same
    app.

    Is there any way I can ensure that a method is only called once if a
    client is connected? Maybe a global sessionsAlive boolean or such? Or
    somewhere that ALL asp.net httpApp instances have access to so I could
    query the contents of a container.

    Thanks
    Matt
     
    Matt, Jul 3, 2007
    #1
    1. Advertising

  2. I think your best bet for this is to have a central WebService that each app
    would automatically make a call to at startup, and it would return the
    information you need to make licensing-type decisions. You could use a
    database for lookups in order to enhance persistence across application
    restarts.
    -- Peter
    Site: http://www.eggheadcafe.com
    UnBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder(BETA): http://www.blogmetafinder.com



    "Matt" wrote:

    > Hi,
    >
    > I am writing a web appplication that will use a global licensing
    > paradigm. For every instance of the server I want to check the
    > licensing requirements i.e the application in a global context. I've
    > read that using the Application_Startup event in HttpApplication class
    > is useless because an application does not map to an instance of the
    > webapp - i.e that method could be called more than once as more
    > httpApplication instances are created to handle request from the same
    > app.
    >
    > Is there any way I can ensure that a method is only called once if a
    > client is connected? Maybe a global sessionsAlive boolean or such? Or
    > somewhere that ALL asp.net httpApp instances have access to so I could
    > query the contents of a container.
    >
    > Thanks
    > Matt
    >
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Jul 3, 2007
    #2
    1. Advertising

  3. Matt

    Matt Guest

    I agree, that cerainly makes sense from a design point of view. thanks
    peter
     
    Matt, Jul 4, 2007
    #3
    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. Wayne
    Replies:
    2
    Views:
    499
    Wayne
    Nov 11, 2003
  2. J-T
    Replies:
    4
    Views:
    9,421
  3. J-T
    Replies:
    0
    Views:
    586
  4. Ameen
    Replies:
    3
    Views:
    3,397
    Ameen
    Oct 18, 2005
  5. Replies:
    1
    Views:
    1,104
    Alexey Smirnov
    Mar 13, 2007
Loading...

Share This Page