3

I have a web service (asmx) to return a list of icons urls as json . Where should I put initialization of the list of all the icons ? I want the list be initialized once.

user670800
  • 1,107
  • 1
  • 11
  • 16

2 Answers2

5

You could simply load the list into a static variable in your service class. The static initialization should only happen the first time the class is loaded by IIS.

Ryan Gross
  • 6,423
  • 2
  • 32
  • 44
2

Have a look at this question: C# How to initialize WebService

Community
  • 1
  • 1
ata
  • 8,853
  • 8
  • 42
  • 68