Session Time Out Not expiring session value as using update panel

Hi all,

I have a page test.aspx. I am using update panel. At the Page load I am having this code:


Context.Response.Expires = 0
Context.Response.AppendHeader("Pragma", "no-cache")
Context.Response.AppendHeader("Refresh", Convert.ToString(Session.Timeout * 60) & "; URL=../Main/NewWelcome.aspx")

 Now after 60 sec it is going to the NewWelcome.aspx but the session till have value as I clicked a button which was inside the update panel. How to resolve my problem?

Thanks for any help. Have a nice day

3/25/2009 2:09:12 PM 91979 articles. 4 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 28
Get it on Google Play
Get it on Apple App Store


I am a little confused about your problem. Let's say, you make the page redirect to Welcome.aspx after 60 seconds right? Then, the code above must be located in another page. So, I wonder which page you put your UpdatePanel in? Or, did you go back to the previouse page to click the button in UpdatePanel?

Anyway, you can have a try on this code since the issue looks like that you need to remove the cache: 

Response.AppendHeader("Cache-Control", "no-store")

If I have misunderstood you, please feel free to let me know.

Best Regards,
Shengqing Yang

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread : )
3/30/2009 9:48:39 AM


Thanks for yor reply. I am describing my project suructure.

1. I have a home.aspx page. After successfull login it is redirecting to the welcom.aspx page. This Welcome page Content a left menu which a usercontrol name leftmenu.ascx. In that left menu there is some links. Now while we are clicking the left menu it is intializing a session("PageName") for the corresponding link and everytime redirecting to the welcome.aspx, In welcome.aspx we have a iframe and by that iframe everytime with the change of the session value we are loading a new page.

So finally the structure of welcom.aspx is...1) Leftside has a left menu which is LeftMenu.ascx, 2) In middle one iframe is there which is suppose loading test.aspx....3) And the base container which is holding those two files is Welcome.aspx.

Now in this structure the test page is using ajax update panel. So after loading the welcome.aspx page, The session timeput countdown started. Now if you are changing any event to the test.aspx page, It is refreshing the countdown for test.aspx only, Not welcome.aspx...So this two different timeout value is creating problem of time out...some time it is timing out inside the iframe or It is unable to time out.

I think I have cleared you a bit of sense. Any query related this tropic are most welcome. Thanks again for your reply.



3/30/2009 10:56:35 AM

Similar Artilces:

session expiration to Store Session Expiration Time in Database
Hi Friends       i have requirement  for Session expiration. I am using the Form authentication. When user login to application the user  login time maintained in Database in table.When user Session is expired i want to update the record of the user in the database.How to do this.   Thank in Advance    Use session_end event in Global.asaxCheers,Rahul SoniPremier Field Engineer - Microsoft www.dotnetscraps.comPlease: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know ...

Time out session expired on new session
After updating to Intraweb XII (12.2.28) I am noticing some odd behavior. I started a new session and eventually the session expired. I get the usual session expired page and move on. No problem there. I close the session and even restart the Intraweb application, which is being run as a service. When I next access the service I get the session expired page. It seems to think that I am accessing the old session even after the application has been killed and restarted. ...

session start error: Simulator session timed out
I get this error when I try to run a simple FMX App on iOS Simulator. PAServer is running and connection test is ok. In fact, the simulator opens correctly, but the App is not launched. I'm developing to iPhone Simulator 7.1 from Delphi IDE. XCode version on iMac is 6.1 Command Line Tools 6.1 Also tried developing to iOS 8 and iOS 8.1 with same result. I have followed all tips, instructions, etc... that appears after a deployment error on IDE. What can I do? Thanks What's the error? > {quote:title=Eli M wrote:}{quote} > What's the error? The one indi...

Updates disable running session of Firefox, requiring termination of session, starting again and indicating that the update is not to be continued.
Name: Ros Kushinsky Email: rosdotkushatgmaildotcom Product: Firefox Summary: Updates disable running session of Firefox, requiring termination of session, starting again and indicating that the update is not to be continued. Comments: I am getting really annoyed with finding that Firefox sessions are frequently frozen (effectively crashing) often soon after starting, because an update is getting started. I want Firefox to ask whether I want to do the download and to be rem inded again when I am closing off the session, when I would be happy to receive the download. I find th...

how to get session expire time
Hi, I want to make a user audit report, which contains the information of user login time and logout time. i feverything goes fine we can get the logout time using session_end event. but in some cases we are not been able to capture the logout time for eg. improper shutdown of machine or close the application by right click in taskbar.   There is no straight forward way to know when exactly the user closed his/her web browser. However, Bilal Haidar wrote an article maybe it can help in here Hope thi...

How to use Session to pass the Session value into another page?
I have my Session("Language") = "HK" in the first page and would like to use it in another page? Mark up: .NET Framework 3.5 Error: It throws Input string was not in a correct format. Why is that? . . : : LarnVok : : . . Hi, What kind of session are you using ? StateServer, SqlServer or InProc ?  Can you post a more detailed code sample ?   ThanksDon't forget to click "Mark as Answer" on the post that helped you. I substituted the Session("Language") with Session.Item("Language"), it worked. Can ...

Session Issue: Session Gets Expired for all the users in a website
Hi Team, This is the strange problem I am facing since couple of days. My site is hosted on Godaddy servers(shared hosting). In my application, since last couple of days, session expires frequently. There are no code updates and it started suddenly. Also, the session gets expired for ALL USERS of the WEBSITE together. THis is very strange issue but are not able to figure out what is the cause. Has anyone in the team faced such issues with Godaddy? Our site is LIVE on the production server and I need your expert Help ASAP. Regards Jigar J...

I must be missing something. I can not get the tabs to come back as they were when a session is ended. On the Main tab, I have "Show my windows and tabs from last time" On the Privacy tab, I have "Always clear my private data" with ONLY Download History, Cache, and Authenticated Sessions selected. When I close a session and then restart Firefox, I only get a single blank tab. -- The Frosted Flake +------------------------ SPAM is for eating ------------------------+ Frosted_Flake wrote: > I must be missing something. I can not get the tabs to come...

Not getting updated value of Session in webservice...?
Hello All, I am having one VB.NET application to access web service. In that application I am clicking one button, which makes an Asynchronous call to web service. On clicking button it makes asynchronous call to the web service method (MakeLoop). In this loop I am changing the value of session variable. Now as I have made asynchronous call to the web service so I can access other method using same web service object. That other method is useful to get change session object value (value changed in method MakeLoop). But I am not getting that changed value.....? Why ......

Using Sessions to get the values from the database
Hello! I have a scenario for my application for the intranet that I would like to implement but I am in need of advice. I have the user log in using the Windows Authenication and the session variables are created. I want the application to be able to pull their records from the database such for the Update page. The most consistent thing in the database is their e-mail which would be their work e-mail. So I am thinking of setting session variables that would grab their records based on their e-mails. Am I correct on this thinking? Thanks! ^Bump Anyone? why do u want to session vari...

Session get Expire when i change time at runtime
Hi, My problem is that i m having a session which will help me to retrive the perticular Record from Database based on the current time. but when i change the local time at runtime (For testing)  my session gets expire. what to do in this situation. i Have tried to use the Property but no luck... and i just want to make alive only one session how do i do this. And if property then how to do this,, Please help me.. Thanx in Advance..Nikita Prajapati Session has start time and timeout. If you change localtime and this change is greater than session timeout (default 20 mi...

How to use session and session veriables
how can i decleare a session ,assigned a value and use that value in other pages as well in the same pages.   U can declare session in global.asax or in aspx page directly u can use webform1.aspxSession("date")=system.datetime.todayu can access this variable in no of forms. once u r requirement is over make session as nothingSession("date")=NothingThank uBabaPlease remember to click "Mark as Answer" on this post if it helped you.  Thank uBabaPlease remember to click "Mark as Answer" on this post if it helped you. I actually wa...

Session expire before session timeout
Hi All ASP.Net Users, I am making an application, and using session variable. I had define session timeout default 20min, and it is define in iis as 20min also. Now issue is, session is getting expire before 20min. I had tried all means to find out, but not getting any clues, can anyone tell me what may be the problem, Secondly, is it possible, to re initialise the session time out if there is any events fired on the page, so that user don't have to login every time,or get the error page.   AnujAnuj are you using session multiple times in your page life cycle.. pls avoid it a...

Session Start / Session End
What kind of hoops do I have to jump through to get ASP.NET (1.1 and 2.0) to fire an event to call routines of my choice when a user's session begins and ends? TIA,Owen why don't you use the global.asax session start event? Global.asax in 2.0:

Web resources about - Session Time Out Not expiring session value as using update panel -

Blink Messenger - Expiring group texts, photos, and chats for iPhone, iPod touch, and iPad on the iTunes ...
Get Blink Messenger - Expiring group texts, photos, and chats on the App Store. See screenshots and ratings, and read customer reviews.

Americans fear consequences of unemployment benefits expiring
More than 1 million will lose benefits; Obama administration urges Congress to extend them after holiday break

[Update: Official Statement] Many Cerberus Free 'Lifetime' Licenses Are Expiring In A Few Days Because ...
Cerberus is one of the more full-featured device security apps available on Android. It has more features than Android Device Manager, and more ...

Rumor: Apple's expiring chip contract with Samsung will lead to TSMC-built 'A7' chips
Apple's future "A7" chips for 2014's "iPhone 6" will be built by Taiwan Semiconductor Manufacturing Co. once the existing contract with Samsung ...

Senate impasse: NSA spy tactics—including phone records collection—expiring
... Sunday to extend three Patriot Act surveillance measures ahead of their midnight expiration. One spy tool whose legal authorization was expiring ...

Despite expiring deadline, Saab talks with Chinese investors continue
Time is running out on the Memorandum Of Understanding between Saab parent Swedish Automobile and the automaker's two Chinese suitors. The MOU ...

County idea: Keep expiring gas tax, use funds to fix crumbling streets
County Administrator Chuck Huckelberry and the Pima Association of Governments want the state to raise gas taxes, with the extra money dedicated ...

How expiring Bush tax cuts will affect you
If the Bush tax cuts disappear altogether, it will affect everyone not just wealthy taxpayers. Learn all about taxes at

D/FW Airport CEO sees need for 6th terminal; unworried by Wright Amendment expiring
Just three months into the job, Sean Donohue’s got one of his first chances to talk to the public about his plans for the airport.

"The Senate opened a rare Sunday night session in a desperate attempt to extend a national security surveillance ...
"Senator Harry Reid, Democrat of Nevada, criticizing Mr. McConnell on the Senate floor, said, 'The majority leader had five months' to fix the ...

Resources last updated: 12/18/2015 7:23:28 PM