Would this static class method be called only once when IIS application starts when used in the context of an ASP.NET web app?
public static class Licensing
{
public static bool IsThisLicensed(ThisFeature)
{
return Licenser.FeatureEnabled(ThisFeature);
}
}
We have a case wherein a call similar to this returns True (as it should) for a period of time and then subsequently returns false until IIS is restarted. Upon restart of IIS the value returns True again. That said, the timing of this behavior is not predictable.
We can't figure out why the value changes without a restart of IIS or recycle of the app pool. Our expectation was that this static method would be called once when the application is started and the value would be available application wide until the app was restarted.
I think this is similar to a previous post: but in this case we are working with a call to a method as opposed to a property.