473,387 Members | 1,536 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

Session_start event does not get fired

Hi:

I have a web application which runs fine on our production server. But
now when I install abother production server, it gets
"System.NullReferenceException: Object reference not set to an
instance of an object". It is because the session variable does not
initialized. in my session_start event, I have initialized all the
session variables, and it works on my another production server.

I comapred 2 server's configuration, they are both windows 2003
stardand edition, but the works one is service pack 1 and the new
production server is service pack 2, also on the new production server
IIS I deleted the "default web site".

On Properties >Home Directory Configuration Options
Enable session state is enabled, session timeout is 20 minutes on both
machine.

On Properties ASP.NET Edit Configuration state management
Session state mode: inProc, Cookieless mode: UserCookies, session
timeout: 20min

and I am running under ASP.NET version 2.0.50727

I also ran aspnet_regiis.exe -i to reinstall asp.net.

does service pack 2 or delete default web site have anything with this
problem? Please help....

thanks
-rockdale
Dec 21 '07 #1
1 2069
I've hardly seen an instance when session start does not fire. I would first
suspect the code. Remove all your application logic in the start handler and
write a simple test page that manipulates session. See if that works. Then
start adding back the logic one bit at a time. See if that works.

--
--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99

"rockdale" <ro************@gmail.comwrote in message
news:b8**********************************@l32g2000 hsh.googlegroups.com...
Hi:

I have a web application which runs fine on our production server. But
now when I install abother production server, it gets
"System.NullReferenceException: Object reference not set to an
instance of an object". It is because the session variable does not
initialized. in my session_start event, I have initialized all the
session variables, and it works on my another production server.

I comapred 2 server's configuration, they are both windows 2003
stardand edition, but the works one is service pack 1 and the new
production server is service pack 2, also on the new production server
IIS I deleted the "default web site".

On Properties >Home Directory Configuration Options
Enable session state is enabled, session timeout is 20 minutes on both
machine.

On Properties ASP.NET Edit Configuration state management
Session state mode: inProc, Cookieless mode: UserCookies, session
timeout: 20min

and I am running under ASP.NET version 2.0.50727

I also ran aspnet_regiis.exe -i to reinstall asp.net.

does service pack 2 or delete default web site have anything with this
problem? Please help....

thanks
-rockdale

Dec 24 '07 #2

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

Similar topics

1
by: Alberto | last post by:
I'd like to write some code in the Session_Start event of the global.asax but it doesn't work. Actually I'm writting this in the Global.asax.cs (In C#): protected void Session_Start(Object...
6
by: Jeff Smythe | last post by:
Why does Session_Start in Global.asax fire for every page opened during a session of an ASP.NET application? Am I wrong to expect that it would fire only when the first page (i.e., any page in...
0
by: Reinhard Lehner | last post by:
Hi there! In my ASP.Net WebApp the Session_Start event in Global.asax is not fired and no session object is created. SessionState is enabled in web.config. What could be the reason for...
5
by: Niklas Uhlin | last post by:
Someone please explain why Session_Start fires multiple times / retains SessionID values between sessions, when you open an ASP.NET page from MS Word. For details of the problem, see below: 1....
0
by: Jason Lehman | last post by:
When testing on my local machine, the session_start fires fine. I try storing a value to my database, creating a timestamped text file, and writing a line of text to a general log file. All of...
0
by: RobbRoss | last post by:
I have a C# Web project that I migrated from VS2003 to VS 2005. I have some session variables in the global.asax file's Session_Start event. I want to set default values here for these variables....
9
by: jeff | last post by:
New VB user...developer... Situation...simplified... - I want to wrap a pre and post event around a system generated where the pre-event will always execute before the system event and the...
5
by: jaysonnward | last post by:
Hello All: I've recently been recreating some 'dropdown menus' for a website I manage. I'm writing all my event handlers into my .js file. I've got the coding to work in Firefox, but the...
5
by: greg | last post by:
Written in Asp.Net 2.0 The session_start fires on Development server running withing Visual Studio 2005 and also if access web site via localhost on development machine. But if copy to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
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$) { } ...
0
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...
0
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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,...
0
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...

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.