Search code examples
c#sharepoint-2010eventreceiver

HttpContext.Current always equal to null


Please help me to fix my problem. My problem is the HTTPContext.Current is always equal to null. Thanks in advance.. Please see below code

HttpContext _context = null;
public EventReceiver()
{
    _context = HttpContext.Current;
}

Solution

  • Since you're receiving the event, the event has already occurred. By now, the context is gone.