For Programmers: Free Programming Magazines  


Home > Archive > ASP .NET > December 2007 > Session_start event does not get fired









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Session_start event does not get fired
rockdale

2007-12-21, 7:15 pm

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


vapor

2007-12-24, 7:16 pm

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" <rockdale.green@gmail.com> wrote in message
news:b8325873-8eb3-45d5-a6a9-67e4bb958f34@l32g2000hsh.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
>
>


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com