One my web page I have two buttons for flipping through pictures. I use two session variables to track the picture being viewed. Page.Session["pictIndex"] Page.Session["pictCount"] This works fine unless my web page sits for about 20 minutes and if you then click on these buttons, you get an error. The only way to fix this is to load the web page from favorite. I'm not sure what this means.
Your application pool is probably being recycled by the server. There are 3 conditions set on all the servers that can recycle your appliction pool. These conditions are put in place to protect the server from being consumed by one application. These are the conditions. 1) More than 20 minutes of idle time (no http request in 20 minutes) 2) The application uses more than 100 MB memory 3) The application uses more than 75% of CPU time
Well... it's definitely option number one. What can I do about this? Kind of makes using session variables useless.
You can try setting up your application to use SQL sessions. Look at this kb article to get some guidelines on how to do this. http://support.discountasp.net/KB/a...-server-session-on-your-web.aspx?KBSearchID=0
so I have to have a MS SQL Server 2008 installed on my site for an additional $10.00 per month just so that my buttons work past 20 minutes.
Thats correct. The SQL session can run either on SQL 2005 or SQL 2008. Keep in mind the restriction is strictly for no http activity for 20 minutes. Meaning if the browser is not making any http calls to the server for 20 minutes then it will be recycled by our server. Generally speaking most high end applications have a time limit on them. Applications such as banking online will have a defined time limit where if no http activity occurs then the server will automatically think you walked away from your computer. This is not only a performance issue but a security issue.
Is it possible to have the web site force a http request if one hasn't been made in more then 15 minutes?
Just for giggles, would it help him to specify a machinekey validation key vs the random IIS generated key? This fixed a problem with my site. The search page wouldn't work after the 20 min timeout while idle without refreshing. I put the static validation key in and all works perfect. Again, I am using sql (no session variables) and really don't have an idea with howies specific problem. I've learned the past week asp.net in general has some drawbacks. (not DASP, just IIS in general from MS)
I already have that done which solved the "[FONT=Helvetica, Verdana, Arial] Validation of viewstate MAC failed[/FONT]" problem I was having but it doesn't solve using Page.Session variables. Once again... using a Microsoft product seems to involve more pain then pleasure.