user670800
user670800

Reputation: 1115

asp.net web services initialization

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.

Upvotes: 3

Views: 2193

Answers (2)

ata
ata

Reputation: 9011

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

Upvotes: 2

Ryan Gross
Ryan Gross

Reputation: 6515

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.

Upvotes: 5

Related Questions