HttpContext Error In Code Library

  • Thread starter Thread starter Leon
  • Start date Start date
L

Leon

I'm Building a Code Library in VS.NET 2003 to be reference within my ASP.NET
web application.

However, within my Code Library I have an AppException.vb page that keep
receiving the following error when compiled:

Type 'HttpContext' is not defined



Take a look at the code:

' Get the current HTTPContext

Dim context As HttpContext = HttpContext.Current

Etc...


What I'm I doing wrong?

Do I have to do something special when it comes to creating a Code Library?

I tried the same code within my ASP.NET web application and it works?
 
httpContext is part of the system.web namespace. Does your project have
a reference to this?

ASPNet applications get that reference by default.

When you say AppException.vb "Page" do you literally mean a web page or
do you mean "Class"?
 
Back
Top