HttpContext.Current is null in the Event Receivers and the Timer Jobs. But you can fix as well


You should get these values from the Context variable. Please read about thisĀ here.