 |
|
 |
I have used your code with meta refresh tag to call an aspx page every 5 seconds.It works fine.But sometimes still users get session time out.Our application is continuously used by 150 users for 8 hours.Every minute they will hit the server.Help me..to fix this session issue
|
|
|
|
 |
|
 |
I really appreciate your efforts. It resolved my problem.
Regards,
Virat Kothari
|
|
|
|
 |
|
 |
hi,
very cool.
by the time i finish writing this i should know the answer myself. but i'll ask for others: will this work if the browser is minimized?
|
|
|
|
 |
|
 |
This didn't work for me when my browser was minimized.
But this did:
http://aspalliance.com/1621_Implementing_a_Session_Timeout_Page_in_ASPNET.1
|
|
|
|
 |
|
 |
I have implemented this on 2 of the projects I am working on. I did find that 10 seconds insufficent timing to allow the page to refresh the session before the session time out happens for the one project I picked a number off the top of my head I choose 45 seconds and it works great. I could probably reduce it a little maybe down to 30 seconds. I don't have too much time to spare on the project. So, since it worked I am going with it and incidently I was testing with a timeout sent to 5 mins. We usually have it set to 20 min. and if a few cases I have seen it has been set to 600 min. a crazy high number just to avoid the timeout issue. I think this solution works much better though.
|
|
|
|
 |
|
 |
I have to keep some data of the user after his login and until he logout,throughout his session,can we do this with the help of session.Am new to asp.net,so any one can help me as soon as possible..please
|
|
|
|
 |
|
 |
Whether this idea has any relation with database. Because when i am using sql server as backend it is working fine but with oracle it is not.
|
|
|
|
 |
|
 |
Nice idea man....it solved my problem!!
|
|
|
|
 |
|
 |
instead of placing the iframe in user control how about if you have the same code in a class library and have ref in your web project?
make sense and possible ?
|
|
|
|
 |
|
 |
how about the db connection?
|
|
|
|
 |
|
 |
i am so tempted to implement this solution to keep the user session alive...they do NOT like walking away and losing their data.....
but...is this advisable for a web app that will be used INTENSIVELY for a period of ~ a month and simultaneously by thousands of staff members? (september is crunch time for submissions)
esentially all users wait last minute and they will be using the app during the same time window...
does my concern it make sense?
thanks!
|
|
|
|
 |
|
 |
Hi Ladypins, your concerns are valid. I'm sure by now there are more clever ways to make this happen, but before you implement this, I'd consider design first. Long ago, when I did this, my users truly could not store any data in cookies, and I had a State Server running so session state was fairly fast. These choices were satisfactory for my needs of the project at that time.
Consider what data you need to persist, and how it can be done, remember, you have: Application, Session State, View State, Control State, URLs, Cookies, Hidden Fields, RDBMS, Service Layer, etc. Search for MSDN State Persistence for more guidance. A good design will take you farther than thousands of hours of tinkering, trust me. In the case that you do actually need stress testing, check out Microsoft Visual Studio for Software Testers. It will give you an integrated suite of testing tools whereby you may simulate your anticipated operational load for your organization. Good luck, good thinking, and best wishes to you on your project! Please let me know what you decide to do to satisfy your state persistence requirements if you have the time.
Achieve by taking great pride in everything you're charged with, be successful by having the initiative to charge yourself, and realize that talent is comprised of aptitude, hard work, and spirit. Hone in on your aptitudes and dedicate your spirit to reach your full potential.
|
|
|
|
 |
|
 |
thanks T. for logging in to the CP site and replying to my post.
i was starting to wonder if anyone read it...
esentially my users enter a bunch of text into various texboxes and textareas....
i wish they would just click on the Save button before walking away....is that too much to ask of them?!! jeeezzz...
LOL
|
|
|
|
 |
|
 |
i am so tempted to implement this solution to keep the user session alive...they do NOT like walking away and losing their data.....
but...is this advisable for a web app that will be used INTENSIVELY for a period of ~ a month and simultaneously by thousands of staff members? (september is crunch time for submissions)
esentially all users wait last minute and they will be using the app during the same time window...
does my concern it make sense?
thanks!
|
|
|
|
 |
|
 |
This tips is very cool and helpful. Thanks a lot ... Eins
|
|
|
|
 |
|
 |
It's my pleasure Eins!
Achieve by taking great pride in everything you're charged with, be successful by having the initiative to charge yourself, and realize that talent is comprised of aptitude, hard work, and spirit. Hone in on your aptitudes and dedicate your spirit to reach your full potential.
|
|
|
|
 |
|
|
 |
|
 |
Thanks, I really needed this solution. I have to keep hundreds of mobile devices from dropping a session and this is the simplest solution I've seen.
Note, this method, keeps an extra session alive. The main page session ID remains the same, however, the iFrame will have it's own session ID that times out and renews.
Very good.
Buddy S
|
|
|
|
 |
|
 |
It's my pleasure friend, glad it could help you out! Let me know if you discover any other interesting implementations
Achieve by taking great pride in everything you're charged with, be successful by having the initiative to charge yourself, and realize that talent is comprised of aptitude, hard work, and spirit. Hone in on your aptitudes and dedicate your spirit to reach your full potential.
|
|
|
|
 |
|
 |
Hi,
Your article is very simple and worthy.
Keep helping others
Thanks!
Rajendran Thiagarajan.
|
|
|
|
 |
|
 |
Hi,
I check the followig condition in my Master Page.
If Session("UserId") = "" Then
response.redirect("Login.aspx")
End If
I've set the session time out to 240 minutes in global.asa file and also web.confic and it works fine in development.
When the application is deployed in IIs 6.0, the application times out after 20 minutes and the is redirected to Login.aspx...
Please suggest me what to do..
Naveen
|
|
|
|
 |
|
 |
did you checked your machine.config?
|
|
|
|
 |
|
 |
Hi,
This seems to be just the sort of thing I'm after but I don't think it's working properly for me.
I've only got a few months ASP.NET under my belt so many of these concepts are new to me coming as I do from a VB6 background.
I don't have a persistent user control but all the pages in my site use a single master page.
My application stores the userid in session state and it is used in most database updates
I tried putting the Iframe in the body of the master page and left the app running until after the session would have timed out. When I clicked on the button I was returned to my login page and having entered the userid and pwd the update failed as it didn't have the user id anymore.
Can you suggest where I went wrong?
Thanks
Neil
|
|
|
|
 |
|
 |
Hey Neil,
Glad to help out. Check your HTML output by right clicking on the page and doing 'view source'. You might have to give your iframe page some visual elements so you can right click on it in the browser to view source. Inspect the header and see what made it in there. That will tell you if the response was formed as you intended.
Make sure your iframe page is running on the same web as the master page. Make sure your clients have cookies enabled. Still at a dead end? review your authentication code to see what is going on there may be something in your code that is disposing the session variable you expect to be there and redirecting to authenticate again.
Next, go to amazon.com and buy the MCPD: Web Developer set of 3 books from Microsoft Press for the MCPD certification. If you're new to .NET, those are the most efficient resources to learn all the fundamentals for the cheapest price. I did the same thing back in 2001 coming to .NET from Perl, C, and fortran, but it wasn't until I got the MCSD training books for .NET 1.1 that I felt in complete control of the framework.
For ASP.NET focus on the internals - how it works, what happens when you get an HttpRequest, through to the HttpResponse. What is Global.asax? What does it do? How can you manipulate the pipeline with HttpModules? These are great things for a winform developer to master first, which will save a lot of frustration about the differences between win/web apps in .NET.
Cheers,
Tommy
Achieve by taking great pride in everything you're charged with, be successful by having the initiative to charge yourself, and realize that talent is comprised of aptitude, hard work, and spirit. Hone in on your aptitudes and dedicate your spirit to reach your full potential.
|
|
|
|
 |
|
 |
Hi Thomas,
Thanks for the reply, I'd forgotten that I still had an issue with this so here goes.
I did a view source on the page (that uses a master page) and the source for the iframe was:
<iframe id="ctl00_Defib" src="/Defibrillator.aspx" frameborder="0" width="0" height="0">
</iframe>
I'm not sure what you meant by "Inspect the header and see what made it in there" as the iframe had to be placed in the body not the head.
All my pages, once the user has logged in use the same master page.
All pages are running on the same web as I'm still developing on a single machine at present.
What should I look at in respect of authentication code? The user has to log in and from there on the menu uses the user's roles to identify what should be displayed so I'm assuming that the authentication is OK, is that a false assumption?
I'll certainly look into buying the books you recommend when I have some spare cash.
Thanks
Neil
|
|
|
|
 |