| Dart Home | PowerWEB LiveControls for ASP.NET | Custom Development | Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
| Author | Forum: PowerWEB LiveControls for ASP.NET Topic: Error: The server viewstate cache has timed out... |
| stan stank@enformion.com From: sacramento, CA USA Posts: 4 Member Since: 01/10/06 |
posted January 10, 2006 6:18 PM Why do I keep getting following error: "The server viewstate cache has timed out. The application was unable to successfully recover state. To address this exception, modify your web.config to use client-side viewstate caching, or to extend the server cache timeout value." The thing is - it only happend on pages that have PowerWEB.LiveControls. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted January 11, 2006 9:52 AM We have seen some cases where the ViewStateCache mechanism loses state and will result in the exception you are reporting. If you are consistently seeing this exception, we suggest modifying your web.config to include the appSettings key to disable the ViewStateCache. Your web.config should be modified to look something like the following: <configuration> <appSettings> <add key="Dart.PowerWEB.LiveControls.ViewStateCacheEnabled" value="false" /> </appSettings> <system.web> ... </system.web> </configuration> Issues with the ViewStateCache mechanism have been logged and will be addressed in the next product update. If you are working with some pages or applications that do not consistently raise this exception, there is no need to disable the ViewStateCache. |
| paulfle From: Burlington, ON Canada Posts: 14 Member Since: 04/29/05 |
posted January 11, 2006 1:25 PM I just had this error start happening for me as well, and your fix in the web config DID repair the problem. But when I was about to check-in the Web.config to source control, I noticed an additional line in there that I haven't seen before: <system.web> <httpModules> <add name="CallbackManager" type="Dart.PowerWEB.LiveControls.CallbackManager,Dart.PowerWEB.LiveControls" /> Just to test, I removed the CallbackManager entry along with the AppSettings key and all my LiveControl pages are working the way they used to! It probably has to do with the fact that I updated LiveControls to the 12/16/2005 release earlier this week, but either way can you please confirm the recommended fix: Remove the CallbackManager entry? Or add the appSettings key to disable the ViewStateCache? And just curious, but what side effects (if any) would disabling the ViewStateCache have when using the Live Controls? Thanks! |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted January 11, 2006 2:16 PM If you add the appSettings key you do not need to remove the httpModule section that is added. The appSettings key disables the module's processing. Because this section is added automatically at design time, removing it will not always be permanent. |
| bseibenick From: Toledo, OH USA Posts: 22 Member Since: 05/16/05 |
posted January 19, 2006 11:06 AM I don't know if this information helps, but I have a page that has 3 panels on it where 2 are always hidden. When I add a dropdown to the second panel with ~50 items in the dropdown everything is fine. When I added another 600 items to the dropdown I get this error related to the viewstate cache. I will try the workaround shown here but wanted to let you know what I am doing to cause this error. I can give more info as needed. Thanks, Brian |
| mattbta mattbta@gmail.com From: dfw, TX USA Posts: 3 Member Since: 11/16/05 |
posted February 3, 2006 11:48 AM This fix works for pages with textboxes and other live controls, but breaks the fix in 1.4.0 for radio button values being persisted. Is there a way to set this programatically at the page level so we can get around this? I notice the ViewStateCacheEnabled is not an exposed property. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted February 3, 2006 2:02 PM You are correct, this is not an exposed property because it is a global setting for the application and cannot be assigned to the page or an individual control. We are preparing to release an update to LiveControls (v1.4.1) that should resolve issues with ViewStateCache as well as with the radio button checked values being persisted properly. This update should be available for download within the next day or so. |
| mattbta mattbta@gmail.com From: dfw, TX USA Posts: 3 Member Since: 11/16/05 |
posted February 6, 2006 10:00 AM Thanks for posting the update. We'll get to testing it. -Matt |
| mattbta mattbta@gmail.com From: dfw, TX USA Posts: 3 Member Since: 11/16/05 |
posted February 9, 2006 10:53 AM This fix appears to address the problems we had with the radio buttons and then the viewstate. Thank you so much. |
| rbigbie From: Santa Fe, NM USA Posts: 3 Member Since: 05/11/05 |
posted March 16, 2006 6:39 PM I held off on the fix posted earlier in the web.config. I just now updated my server to 1.4.1 version and it seems to resolve the problem. Thank you so much for fixing it and placing a patch out there. ;-) |
| rbigbie From: Santa Fe, NM USA Posts: 3 Member Since: 05/11/05 |
posted March 16, 2006 7:04 PM OMG, I spoke to soon. Just as I was about to shut down for the night, I got that nasty error. oh well, I guess I have to ut the web.config entry in even though I am using 1.4.1 version. Darn. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted March 17, 2006 10:14 AM When you received the exception, was there a long period of inactivity? If so, that would be consistent with the ViewstateCache expiring. |
| rbigbie From: Santa Fe, NM USA Posts: 3 Member Since: 05/11/05 |
posted March 17, 2006 10:44 AM No, there wasn't a long period of activity. What I am doing is using a link button to make a panel visible and non-visible when clicking on the link button. It seems that after several clicks, all is well, but then out of the blue, I recieve the cache error and even if I close the browser and perform and IISReset, the error still occurs and the error occurs right away, no waiting time required. I am using these controls in ASP.NET 2.0 also just an FYI. Thanks. |
John Talarico![]() From: Rome, NY USA Posts: 630 Member Since: 06/01/05 |
posted March 20, 2006 5:27 PM After many iterations of tests with Visual Studio 2005, I was able to induce the exception but not consistently or often. Do you have a set of steps and/or a sample application that consistently produces this behavior? |
| RyanH From: Ottawa, ON Canada Posts: 29 Member Since: 06/27/06 |
posted August 29, 2006 1:57 PM I'm on version 1.5.2.0 and I get this error after a period of inactivity. What are the repercussions if I disable the cache? Don't the controls need the ViewStateCache mechanism to work? Is there a way to adjust the timeout? If not, what is the current timeout? This way, I would possibly be able to set a timeout on my page and send a message to the user. |
| RyanH From: Ottawa, ON Canada Posts: 29 Member Since: 06/27/06 |
posted August 29, 2006 2:03 PM By the way, this happens with the LiveRadioButtonList control. |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted August 31, 2006 2:58 PM The only repurcussion when you disable ViewState caching is ViewState is round-tripped (like it would be using regular ASP.NET controls). We build this functionality into LiveControls to provide optimal response time by caching state on the server. The default timeout is 20 minutes. You can modify this by supplying the following appSettings node: <appSettings> <add key="Dart.PowerWEB.LiveControls.ViewStateCacheTimeout" value="40" /> </appSettings> Since the exception is occurring in the HTTP Pipeline prior to page execution, we add any exceptions thrown in the CallbackManager to the Form variables collection. We then internally check this variable (in OnLoad) and throw the "ViewState cache has timed out" exception. You could do this. Prior to Page.OnLoad (in Page.OnInit for example) you could check the value of Page.Request["pwModuleException"]. If a value exists, that means a pipeline exception occurred and we WILL throw an exception OnLoad. So, you could throw your own exception at this point, or send a response (using Response.Write). However, if you DO NOT throw an exception, you must use Response.End to terminate the page processing...otherwise the exception will still be thrown when Page.OnLoad is called. |
| saisrilu From: columbus, OH USA Posts: 4 Member Since: 01/08/07 |
posted January 8, 2007 8:42 PM How does it work in a Webfarm scenario? If it's cached on the server, there is no guarantee that request will come to the same web server in load balancing scenario. |
Jeff Cranford![]() From: Rome, NY USA Posts: 586 Member Since: 05/30/01 |
posted January 9, 2007 4:51 PM In a webfarm scenario, to assure there will be no ViewState confusion, the ViewState caching mechanism would have to be disabled. |
| Reply | PowerWEB LiveControls for ASP.NET Topics | Forums |
This site is powered by
PowerTCP WebServer for ActiveX
|