User-484054684 posted
It depends basically on where you are setting this static variables.
As you know, static variables will be instantiated during the first access after the application start up. Also, when the application is idle for sometime or during new build/deployment, appPool will be recycled automatically with in the configured time
based on the ping enabled flag on IIS. So, it would behave as if the application is started freshly after this recycle process.
So your scenario is same, when the application start up, the static variable is null. So, need to make sure the code where you are setting this static variable is getting executed during this.