Hello,
I’m trying to obtain the HTTPContext within an Event Handler in a Document Library in MOSS, but all I have is a null value of the HTTPContext.Current, I do the same thing on a List and the HTTPContext is returned. There is a way to obtain the HTTPContext in Document Libraries to access the HTTPContext.Request method?
Thanks for your help
Here is the code:
public class TestContextListItemEventReceiver : SPItemEventReceiver
{
HttpContext current;
static object obj;
/// <summary>
/// Initializes a new instance of the Microsoft.SharePoint.SPItemEventReceiver class.
/// </summary>
public TestContextListItemEventReceiver()
{
current = HttpContext.Current;
}
public override void ItemAdding(SPItemEventProperties properties)
{
obj = current;
}
}