K
Kikoz
Hi all.
I keep my ViewState in server's cache. Works fine except when user leaves
the page opened for a long time (2 hours or so). Then if he/she tries to
post it back the server throws an exception saying that ViewState was
invalid. I suspect it has something to do with cache expiration time. Can I
control its expiration time from within my web.config? Or anyhow? Couldn't
find anything related in web or machine config files or documentation
Just in case: I set all ViewState cache entries with CacheItemPriority.High;
I write and read ViewState to/from the hard drive if an entry gets removed
(expires) from cache (implementing CacheItemRemovedCallback delegate) - and
it looks like it only works on my local machine, files never appear on
production server and I don't see any exception logs explaining why files
were not written to the drive; I would keep ViewState in the Session object
(I suppose it would work more reliably) but I had to create my own session
object (some of my users are scared of any kind of cookies, imagine that),
so the cache is my only choice.
Any kind of help, or related articles, or thoughts would be highly
appreciated!!
Kikoz.
I keep my ViewState in server's cache. Works fine except when user leaves
the page opened for a long time (2 hours or so). Then if he/she tries to
post it back the server throws an exception saying that ViewState was
invalid. I suspect it has something to do with cache expiration time. Can I
control its expiration time from within my web.config? Or anyhow? Couldn't
find anything related in web or machine config files or documentation
Just in case: I set all ViewState cache entries with CacheItemPriority.High;
I write and read ViewState to/from the hard drive if an entry gets removed
(expires) from cache (implementing CacheItemRemovedCallback delegate) - and
it looks like it only works on my local machine, files never appear on
production server and I don't see any exception logs explaining why files
were not written to the drive; I would keep ViewState in the Session object
(I suppose it would work more reliably) but I had to create my own session
object (some of my users are scared of any kind of cookies, imagine that),
so the cache is my only choice.
Any kind of help, or related articles, or thoughts would be highly
appreciated!!
Kikoz.