471,327 Members | 2,426 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,327 software developers and data experts.

No context for HttpContext in class

KJS
This is a C# web app.

The Object HTTPContext is not available in my class. I need to grab an
instance of the Current context with something like:

HTTPContext c = HTTPContext.Current;

The problem is, HTTPContext is not available to my intellisence, even
though I have System.Web above. This is a class object which a web
class form would be utilizing, but am stuck with no context (no
intellisence).

Any idea what might be wrong?
Dec 21 '05 #1
3 2234
KJS
Ok, let me throw out an important piece: the class which I need the
current context is of another project. So I have somthing like:

mySolution
webAppProject
default.cs
myUtilitiesProject
myXMLParser.cs
myDatabaseClass.cs

So, I need Current context across projects. Is this possible?

Karl..
In article <MP************************@news.cox.net>,
ka***********@hotmail.com says...
This is a C# web app.

The Object HTTPContext is not available in my class. I need to grab an
instance of the Current context with something like:

HTTPContext c = HTTPContext.Current;

The problem is, HTTPContext is not available to my intellisence, even
though I have System.Web above. This is a class object which a web
class form would be utilizing, but am stuck with no context (no
intellisence).

Any idea what might be wrong?

Dec 21 '05 #2
KJS
This is a big fat NEVERMIND! I figured it out, just needed to add the
reference to the project for System.Web.DLL

Dohhh!

(maybe this helps someone else)

In article <MP************************@news.cox.net>,
ka***********@hotmail.com says...
Ok, let me throw out an important piece: the class which I need the
current context is of another project. So I have somthing like:

mySolution
webAppProject
default.cs
myUtilitiesProject
myXMLParser.cs
myDatabaseClass.cs

So, I need Current context across projects. Is this possible?

Karl..
In article <MP************************@news.cox.net>,
ka***********@hotmail.com says...
This is a C# web app.

The Object HTTPContext is not available in my class. I need to grab an
instance of the Current context with something like:

HTTPContext c = HTTPContext.Current;

The problem is, HTTPContext is not available to my intellisence, even
though I have System.Web above. This is a class object which a web
class form would be utilizing, but am stuck with no context (no
intellisence).

Any idea what might be wrong?

Dec 21 '05 #3
hi,

nice monologue :)

glad you find the solution though.
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"KJS" <ka***********@hotmail.com> wrote in message
news:MP************************@news.cox.net...
This is a big fat NEVERMIND! I figured it out, just needed to add the
reference to the project for System.Web.DLL

Dohhh!

(maybe this helps someone else)

In article <MP************************@news.cox.net>,
ka***********@hotmail.com says...
Ok, let me throw out an important piece: the class which I need the
current context is of another project. So I have somthing like:

mySolution
webAppProject
default.cs
myUtilitiesProject
myXMLParser.cs
myDatabaseClass.cs

So, I need Current context across projects. Is this possible?

Karl..
In article <MP************************@news.cox.net>,
ka***********@hotmail.com says...
> This is a C# web app.
>
> The Object HTTPContext is not available in my class. I need to grab an
> instance of the Current context with something like:
>
> HTTPContext c = HTTPContext.Current;
>
> The problem is, HTTPContext is not available to my intellisence, even
> though I have System.Web above. This is a class object which a web
> class form would be utilizing, but am stuck with no context (no
> intellisence).
>
> Any idea what might be wrong?
>

Dec 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Srini | last post: by
reply views Thread by Michael McDaniel | last post: by
3 posts views Thread by Seth | last post: by
2 posts views Thread by Jimbo | last post: by
reply views Thread by Daniel Meier | last post: by
8 posts views Thread by rn5a | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.