Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 524
user670800 Avatar asked May 29 '26 13:05

user670800


2 Answers

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.

like image 137
Ryan Gross Avatar answered Jun 01 '26 04:06

Ryan Gross


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

like image 36
ata Avatar answered Jun 01 '26 05:06

ata



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!