Initialize objects in w3wp.exe process of azure role

41 Views Asked by At

I am trying to initialize a singleton class in my azure web role. I tried initializing it in Role.OnStart, but OnStart is called as part of WallSHost.exe process and the requests coming to the role go to w3wp.exe process, where the singleton class is not initialized yet. So it gets initialized when the first request comes to the role. But I am in a situation where the singleton object should be initialized before the first request comes to the role. Application_Start runs as part of w3wp.exe I guess, but Application_start runs only when first request comes to the role. So is there anyway to initialize the singleton object in w3wp.exe before first request comes to the role.

0

There are 0 best solutions below