Web Service with permanent object cached?

Discussion in 'ASP .Net Web Services' started by df, Dec 6, 2005.

  1. df

    df Guest

    Hi,

    I have a question: is ist possible to write a web service which gets a
    cached "permanent object" right on initialisation?
    Let me point out my example: My web service needs a rsa-key. This key
    is stored in a file on the server. Every time I create a new instance
    of the web service, the constructor code is processed and the key is
    read from the file. Is it possible to enable some kind of caching to
    avoid the file access? Or is there a more global constructor so that
    the file is read only once?

    Thank you in advance.

    Dominik
     
    df, Dec 6, 2005
    #1
    1. Advertising

  2. df

    GCR Guest

    Have you considered placing the code in the Global.asax, under the
    Application_Start event handler? This way you read your key only when the
    first instance of your service is created...

    "df" wrote:

    > Hi,
    >
    > I have a question: is ist possible to write a web service which gets a
    > cached "permanent object" right on initialisation?
    > Let me point out my example: My web service needs a rsa-key. This key
    > is stored in a file on the server. Every time I create a new instance
    > of the web service, the constructor code is processed and the key is
    > read from the file. Is it possible to enable some kind of caching to
    > avoid the file access? Or is there a more global constructor so that
    > the file is read only once?
    >
    > Thank you in advance.
    >
    > Dominik
    >
    >
     
    GCR, Dec 7, 2005
    #2
    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. Craig G
    Replies:
    0
    Views:
    399
    Craig G
    Mar 7, 2005
  2. Raghu Raman
    Replies:
    3
    Views:
    510
    gabe garza
    May 7, 2005
  3. Cruella DeVille

    Permanent casting of an object

    Cruella DeVille, May 11, 2006, in forum: Java
    Replies:
    5
    Views:
    524
    Robert Klemme
    May 12, 2006
  4. David
    Replies:
    6
    Views:
    296
  5. jason31879

    Web Service Timer Cached and won't Stop

    jason31879, Sep 1, 2005, in forum: ASP .Net Web Services
    Replies:
    0
    Views:
    157
    jason31879
    Sep 1, 2005
Loading...

Share This Page