Getting the HttpContext from within a library...

G

Guest

How do I get the current HttpContext when I'm in a Class Library (not from
within an ASP.NET page)? I seem to remember calling GetCurrent from somewhere
before but don't remember the details. The business object is being used from
within a Web app, so there should be an HttpContext available...just can't
get it.

Thanks,
Jay
 
G

Guest

Unfortunately, when I type "System.Web...", all Intellisense shows me is
three methods having to do with AspNetHostingPermission.... Nothing else.

That's why I need to call GetCurrent from somewhere, I think.

Jay
 
M

Marina Levit [MVP]

You need to reference System.Web.dll in your project. The VS template for
non-web projects does not include it by default.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,280
Latest member
BGBBrock56

Latest Threads

Top