I’ve got a project which as a reference added to System.Web.
However, it can’t seem to pick up HttpContext. Doing this:
Imports System.Web
_ApplicationBase = HttpContext.Current()
Tells me that HttpContext is not declared. If you look at the methods and properties inside System.Web there are hardly any showing: only AspHostingPermission, AspHostingPermissionAttribute, AspHostingPermissionLevel and Services.
The reference is valid and pointing to the right place. This is driving me crazy – what have I missed?
Cheers,
Matt
An
HttpContextobject exists only during an asp.net request on the thread that is processing the request. In any other thread or process, there is noHttpContextavailable.