Session_start event does not get fired

Session_start event does not get fired

am 21.12.2007 15:32:49 von rockdale.green

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

Re: Session_start event does not get fired

am 24.12.2007 16:13:36 von vapor

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