I have web application. I have a sepertate class library for Business logic layer. I tried to access HttpContext class in Business logic layer. When i type "System.Web.HttpContext" , I am getting this below error.
" The type or namespace name 'HttpContext' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) "
Whats wrong and why i cannot access Httpcontext class?? Please help.
mani2009it
Member
207 Points
82 Posts
I cannot find HttpContext class under "System.Web" namespace in class library.
Dec 03, 2012 05:21 AM|LINK
Hello,
I have web application. I have a sepertate class library for Business logic layer. I tried to access HttpContext class in Business logic layer. When i type "System.Web.HttpContext" , I am getting this below error.
" The type or namespace name 'HttpContext' does not exist in the namespace 'System.Web' (are you missing an assembly reference?) "
Whats wrong and why i cannot access Httpcontext class?? Please help.
Thanks.
kedarrkulkar...
All-Star
35557 Points
5696 Posts
Re: I cannot find HttpContext class under "System.Web" namespace in class library.
Dec 03, 2012 05:46 AM|LINK
did u try adding reference to "System.Web" dll in class library... by right clicking on class library project and "Add Reference"?
hope this helps...
KK
Please mark as Answer if post helps in resolving your issue
My Site
pratiksolank...
Member
271 Points
76 Posts
Re: I cannot find HttpContext class under "System.Web" namespace in class library.
Dec 04, 2012 07:10 PM|LINK
Hi,
Right click Project-->Add Reference--> Dialog box will open up--> select here --> System.Web
Then in your code file add directive.
using System.Web; (For vb use Import)