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? 3 2285
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?
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?
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? > This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Srini |
last post by:
I am implementing Front Controller in ASP.net as outlined in Microsoft documentation titled "Implementing Front Controller in ASP.NET Using HTTPHandler"...
|
by: Michael McDaniel |
last post by:
I have overridden HttpApplication in my class library.
When my application starts, There are configuration files that I need to
load in order for my application to work correctly. This works...
|
by: Seth |
last post by:
I have been trying to create a mock httpcontext for the
purpose of unit testing. I have a class, Customer, that
uses cookies. I have set it up to be able to take a
httpcontext as a parameter in...
|
by: |
last post by:
Hoping someone can help with a simple but puzzling problem. I have some code
that I want to build as a class method. The code works fine when I embed it
in Page_Load. But when I try to generalize...
|
by: Jimbo |
last post by:
Hey
Have a real problem here.
I have a page that consists of a lot of div tags and everything on the
page is made in controls.
In one of the controls we call a method in another class that...
|
by: nalbayo |
last post by:
what's the difference between
HttpContext.Current.User.Identity.Name;
and
Context.User.Identity.Name;
thanks!
|
by: Greg Hurlman |
last post by:
I have an HttpModule that captures the
FormsAuthenticationModule.Authenticate event, and replaces the
HttpContext principal with a custom principal. The code is
straightforward enough, yet when...
|
by: Daniel Meier |
last post by:
Hi
I'm using a custom PageHandlerFactory as it's used in Microsofts p&p
WebClient Software Factory.
The problem is, that I cannot use Sessions now;
HttpContext.Current.Session is null.
When I...
|
by: rn5a |
last post by:
I have a user control named Enter.ascx which has 2 TextBoxes. The 2
TextBoxes are named txt1 & txt2. The entire logic of this user control
(like the properties of the 2 TextBoxes using set/get...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |