Session variable returning null …after couple of postbacks..though user session still exists…

1,421 views
Skip to first unread message

swathi muthineni

unread,
Aug 30, 2010, 11:35:45 AM8/30/10
to DotNetDe...@googlegroups.com
I have logged in to the application (In development Environment) with my userid and pswd...
 
I am using Session variables in the application..in order to access some values across different pages. Though my session didnt time out, my session variables are becoming null after a while...Can some one please help me with this..
Thanks,
Swathi

Buddy Z

unread,
Aug 31, 2010, 4:33:33 PM8/31/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I've run into this problem, if your application is running on multiple
servers but you do not have session management across servers. If you
were just dealing with postbacks I would say use viewstate variables.

But if session variables aren't working you could try cookies instead,
if the data is not a security risk...

mahendiran jayavarma

unread,
Aug 31, 2010, 1:19:28 AM8/31/10
to dotnetde...@googlegroups.com
can u change the session mode(Inproc) in  web.conf file
Rgds,
Mahendiran.

Jamie Fraser

unread,
Sep 2, 2010, 5:13:31 AM9/2/10
to dotnetde...@googlegroups.com
Are you sure you aren't doing anything that would cause the app to
restart? Such as modifying a file within the app? (i.e. changing
web.config, writing a file to a subdirectory etc can all cause the app
to restart).

Cerebrus

unread,
Sep 2, 2010, 5:42:03 AM9/2/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
Common problem.

The ASP.NET worker process (> v. 2.0) gets recycled if it encounters
an unhandled exception. This results in all session state being
cleared (assuming you're running InProc).

srinivas karre

unread,
Sep 2, 2010, 12:32:58 PM9/2/10
to dotnetde...@googlegroups.com
HI,
can i check u r code at once. R u working on asp.net(C#.net) or windows application whatever it is send me those files to me. after checking i can solve u r problem easily.

--
Thanks And Regards,
 Srinivas Karre
9293947105

Cerebrus

unread,
Sep 5, 2010, 4:27:31 PM9/5/10
to DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting
I'm sure you can solve it easily, as is apparent by the ease with
which you deduced the possibility that this might be a Windows
application, even though the whole question centers around Session
state, postbacks and Pages.

"Elementary, my dear Watson! Elementary!"

On Sep 2, 9:32 pm, srinivas karre <srinivaskar...@gmail.com> wrote:
> HI,
> can i check u r code at once. R u working on asp.net(C#.net) or windows
> application whatever it is send me those files to me. after checking i can
> solve u r problem easily.
>
Reply all
Reply to author
Forward
0 new messages