Salesforce: Object reference error when fetching connector data on site initialization and scheduled job
Jul 17 2018
Aug 23 2018
Closed, Fixed and tested
Salesforce stores the login result object in a request variable. The process of fetching the data in the initialization module and scheduled job occurs in a parallel loop.
If the request for Salesforce data happens in a thread different from the originating one, the HttpContext is null. This results in a null reference exception.