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
If this error is happening at design time then it's a case of a missing assembly reference. Make sure your project is referencing the System.Web.dll assembly.
An HttpContext
object exists only during an asp.net request on the thread that is processing the request. In any other thread or process, there is no HttpContext
available.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With