943,822 Members | Top Members by Rank

Ad:
  • ASP.NET Discussion Thread
  • Unsolved
  • Views: 29445
  • ASP.NET RSS
Mar 17th, 2005
0

ASP.NET - session objects Problem

Expand Post »
I am facing problem in asp.net.
Problem is : Session objects is not working properly.in the sense some times it will work some times not(getting empty).
Plz Can anyone help me in this . Its very urgent !!!!!!
Eg:
In web.config - In <Sessionstate timeout=30>,but before 30 minutes only its getting empty.
2) In Global.asa : session_start - if i give session("emp_code"),
Whwn i login some times that session("emp_code") is getting empty.

Thank you for reply

Rooparaj K N
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
rooparaj is offline Offline
8 posts
since Jan 2005
Mar 18th, 2005
0

Re: ASP.NET - session objects Problem

To my knowledge you have to set the Method of Storage for the session.

See: Link

You need to specify the session storage method:

So that is why ou are having an empty Session!

Hope this helps!
Quote originally posted by rooparaj ...
I am facing problem in asp.net.
Problem is : Session objects is not working properly.in the sense some times it will work some times not(getting empty).
Plz Can anyone help me in this . Its very urgent !!!!!!
Eg:
In web.config - In <Sessionstate timeout=30>,but before 30 minutes only its getting empty.
2) In Global.asa : session_start - if i give session("emp_code"),
Whwn i login some times that session("emp_code") is getting empty.

Thank you for reply

Rooparaj K N
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Apr 14th, 2005
0

Re: ASP.NET - session objects Problem

hi Paladine
its praveen i want to ask u how can i store my customer id in any variable so i can access it in Query to get data form table then and then i want to use it in next or next page
2 when i use back button then it will run my load event from that particular id and return all information so user didn't get Error
can u halp me to do this
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Qbit75 is offline Offline
9 posts
since Apr 2005
Apr 14th, 2005
0

Re: ASP.NET - session objects Problem

Ok I am sorry to say, but your question is framented, and a little vague.

The page_load event does not fire when you use the back button. This event only fires on a Refresh or first time to the page. Back button relies on the browser cache.

To retain the CustomerID for what ever purpose, I would just use a session variable.

Session_Start
Session("CustID") = 0

Then in the first query on the DB, you reassign the retrieved value to th Session object.

Not sure whatelse you are asking for?


Quote originally posted by Qbit75 ...
hi Paladine
its praveen i want to ask u how can i store my customer id in any variable so i can access it in Query to get data form table then and then i want to use it in next or next page
2 when i use back button then it will run my load event from that particular id and return all information so user didn't get Error
can u halp me to do this
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Apr 23rd, 2005
0

Re: ASP.NET - Creating UserControls

hi i want a user control to show me a popup calender and then i select a date and it comes in the text box as 24-mar-2005 is it possible if yes then give me link or code behind
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Qbit75 is offline Offline
9 posts
since Apr 2005
Apr 28th, 2005
0

I want to convert my access db into xml and xsl ,xslt

hi is it possible to convert a access db int0o the xml, xsl, xslt files
i read it but forget it so i wnat to reopen it
Reputation Points: 10
Solved Threads: 1
Newbie Poster
Qbit75 is offline Offline
9 posts
since Apr 2005
Apr 28th, 2005
0

Re: I want to convert my access db into xml and xsl ,xslt

The sentence kind of makes sense, but maybe you could take another stab at it and explain what you want to do exactly? And how that applies to session objects (the theme of this thread)?

You can convert the Access DB tables to XLS, HTML or ASP files, but not to xml or xsl/xslt files (to my knowledge not directly anyway).

Quote originally posted by Qbit75 ...
hi is it possible to convert a access db int0o the xml, xsl, xslt files
i read it but forget it so i wnat to reopen it
Team Colleague
Reputation Points: 211
Solved Threads: 27
Master Poster
Paladine is offline Offline
793 posts
since Feb 2003
Nov 28th, 2008
0

Re: ASP.NET - session objects Problem

If your problem is that your page is getting timed out before the timeout value set.
Then I will suggest you to change your web.config code like this.

ASP.NET Syntax (Toggle Plain Text)
  1. <sessionState
  2. mode="StateServer"
  3. cookieless="false"
  4. timeout="30"/>

Here I have changed the session state to a seperate worker process (ASP state management server).

It is recommended to move your session into the stateserver or SQL server state management in the production environment.

Note: You need to start the 'ASP.NET State Service' windows service on the web server in order to make this code work.


Click to Expand / Collapse  Quote originally posted by rooparaj ...
I am facing problem in asp.net.
Problem is : Session objects is not working properly.in the sense some times it will work some times not(getting empty).
Plz Can anyone help me in this . Its very urgent !!!!!!
Eg:
In web.config - In <Sessionstate timeout=30>,but before 30 minutes only its getting empty.
2) In Global.asa : session_start - if i give session("emp_code"),
Whwn i login some times that session("emp_code") is getting empty.

Thank you for reply

Rooparaj K N
Last edited by peter_budo; Nov 29th, 2008 at 5:59 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 4
Newbie Poster
johnly is offline Offline
17 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP.NET Forum Timeline: appending and eleminating elements from the list
Next Thread in ASP.NET Forum Timeline: Problem with Edit/Update in GridView...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC