Sporadic Null exception crashing issue while resolving Context

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 years ago
Sporadic Null exception crashing issue while resolving Context object in NOPCommerce
It was observed that context object does resolve and load items but this
happens post to subsequent steps in code leads us to think there is
a delayed loading due to which null expection appear
Multiplle thread or asynchronous or autofac di issue suspected
If a delay is put in code it is observed to work proper though...


eg,
protected void Application_BeginRequest(object sender, EventArgs e)
in the global.asax.cs
var sis = EngineContext.Current.Resolve<StoreInformationSettings>();
sometimes sis is coming as null and when i added below lines after that sis value is coming        
   while(sis == null)
            {
                Thread.Sleep(500);
                sis = EngineContext.Current.Resolve<StoreInformationSettings>();
            }
in
6 years ago
We seem to suffer from the same issue.
Sometimes it seems resolving context is not working correctly.
Has this been researched or adressed?
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.