Web Service with permanent object cached?

D

df

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
 
G

GCR

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...
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top