473,804 Members | 3,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problems with Session State

Hello,

I've got two classes: EventLog and ErrorLog. I need to access Session
state from these classes, but they are not associated with ASPX pages.
So I've been accessing the Session object through
HttpContext.Cur rent.Session["someVar"].

This was working fine for several months. Suddenly, ErrorLog stopped
being able to "see" the Session object. I made no changes, so I'm
frankly quite stumped. They both import the same namespaces, yet when
ErrorLog is executing and I set a watch on
"HttpContext.Cu rrent.Session", it shows as "<undefined value>".

Any ideas? Thanks.

Regards,
Jeff Shantz
Nov 18 '05 #1
3 1210
post some relevant code which reproduces the problem

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Jeff Shantz" <je********@msn .com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Hello,

I've got two classes: EventLog and ErrorLog. I need to access Session
state from these classes, but they are not associated with ASPX pages.
So I've been accessing the Session object through
HttpContext.Cur rent.Session["someVar"].

This was working fine for several months. Suddenly, ErrorLog stopped
being able to "see" the Session object. I made no changes, so I'm
frankly quite stumped. They both import the same namespaces, yet when
ErrorLog is executing and I set a watch on
"HttpContext.Cu rrent.Session", it shows as "<undefined value>".

Any ideas? Thanks.

Regards,
Jeff Shantz

Nov 18 '05 #2
Is your Eventlog and Errorlog objects are running in the process of ASP.NET.
If it is running in different process then you cant access the context
across processes.

--
Saravana
Microsoft MVP - ASP.NET
www.extremeexperts.com

"Jeff Shantz" <je********@msn .com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Hello,

I've got two classes: EventLog and ErrorLog. I need to access Session
state from these classes, but they are not associated with ASPX pages.
So I've been accessing the Session object through
HttpContext.Cur rent.Session["someVar"].

This was working fine for several months. Suddenly, ErrorLog stopped
being able to "see" the Session object. I made no changes, so I'm
frankly quite stumped. They both import the same namespaces, yet when
ErrorLog is executing and I set a watch on
"HttpContext.Cu rrent.Session", it shows as "<undefined value>".

Any ideas? Thanks.

Regards,
Jeff Shantz

Nov 18 '05 #3
Are the classes somehow accessed out from web context?

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"Jeff Shantz" <je********@msn .com> wrote in message
news:c8******** *************** ***@posting.goo gle.com...
Hello,

I've got two classes: EventLog and ErrorLog. I need to access Session
state from these classes, but they are not associated with ASPX pages.
So I've been accessing the Session object through
HttpContext.Cur rent.Session["someVar"].

This was working fine for several months. Suddenly, ErrorLog stopped
being able to "see" the Session object. I made no changes, so I'm
frankly quite stumped. They both import the same namespaces, yet when
ErrorLog is executing and I set a watch on
"HttpContext.Cu rrent.Session", it shows as "<undefined value>".

Any ideas? Thanks.

Regards,
Jeff Shantz

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1981
by: Phil Grimpo | last post by:
I had previously explained this problem in a different thread, but now that I have an IISState log, I figured I'd re-start the thred. My situation and the log are following... I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of these menus are then placed into the page by calling...
0
3232
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs converted/developed with VB.NET. What I want from debugging is to be able to step into the methods in the DLLs called from ASP scripts using Visual Studio .NET. Background: For typical script debugging issues, you can read and follow the two documents on...
2
2295
by: John Mullin | last post by:
We are having a problem which appears similar to a previous posting: http://groups.google.com/groups?hl=en&lr=&frame=right&th=d97f552e10f8c94c&seekm=OZw33z9EDHA.2312%40TK2MSFTNGP10.phx.gbl#link1 In the current release of our system, we decided to "wrap" the ASP.NET Session and Application objects to improve code clarity and accuracy. For example, instead of: Session = new SomeListClass;
0
1274
by: Peter R. Vermilye | last post by:
I am involved on a web application that is using a third party set of APIs for remote database access (middleware). I've been brought in because of my background in programming, thus I'm new to this web development process so forgive my ignorance. The third party has a shopping cart which must be saved in the session. When navigating from page to page we experience some odd behavior on the hosted server that we do not see on our...
1
6996
by: RDizzle | last post by:
okay. so all i am doing is changing a registration script that uses $_GET to a script that uses $_POST, but the validation script now returns NULL values for all posted vars. What's the deal? NOTE: when i use $_GET the script just works. Thanks in advance for helping a noob.
1
1645
by: mcbobin | last post by:
Hi, Hopefully somebody can help me... The development team I work in has created a large application that has started displaying some nasty bugs which we think are being caused by the session state. When a single user logs in, their location ID is assigned to the session state. This location ID persists until the browser session is
4
3270
by: =?Utf-8?B?TmFkYXYgUG9wcGxld2VsbA==?= | last post by:
Hi everybody, I've got two questions about using the EnableSession property with an ASP.NET WebService: First Question: I'm trying to create a web service with EnableSession=true. I can't get it to work with VS2005 ( It works with vs2003!). Here is my testcase:
8
5291
by: Tomasz | last post by:
Hello Developers! I have an interesting problem using my custom MembershipProvider, RoleProvider and Forms Authentication. Both MembershipProvider and RoleProvider require session state, where some very important context data are stored during the Session_Start event. My MembershipProvider and RoleProvider depend on this information. It seems that authentication process works with no problems.
4
4765
by: =?Utf-8?B?Um9iSEs=?= | last post by:
I have two websites setup on an IIS Server. In the web.config files i have <sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="120" /> <!-- GLOBALIZATION This section sets the globalization settings of the application. --> Inside of IIS, when you click on the website, you view the properties for a website, click the ...
5
5635
by: Claudio M. E. Bastos Iorio | last post by:
Hi, anyone using VS2008 (final) on windows Vista? I have a problem. The ASP.NET web site administration tool on any site created by VS2008, running on Vista, is not working as it should. I can configure users, roles, but when I try the option 'Select a single provider for all site management data' AspNetSqlProvider test, I receive the message: 'Could not establish a connection to the database. If you have not yet created the SQL Server...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10583
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10337
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10323
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9160
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2995
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.