question

JulioBello-4525 avatar image
0 Votes"
JulioBello-4525 asked JulioBello-4525 edited

Is There an OnStart Event Handler for Webservices?

Hi, Everybody!

I have several webservices created/written under one single Visual Studio project, WebServices. This was an "inherited" design. Personally, I would have managed each of them under their own project and deployed them separately. As it stands, all gets deployed together.

I want one of the webservices in particular to load data on start-up and persist throughout its lifetime, using the data to handle its own requests, until the next restart or shutdown. I want the other webservices to be unaware of this data. I wish to keep it hidden from the other webservices.

Does each webservice have its own OnStartup event handler?... If not, what is the best way to implement this? Should I create a singleton base class that loads the data and makes it accessible only to the derived webservice in question? Are there other better approaches?

dotnet-csharpdotnet-standard
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

0 Answers