M
Mike
I have the need to keep a substantial amount of session state, but I
do not have the option of using the HttpSessionState object. My
current scheme for dealing with this is to convert all the state
values to strings, place them in the query string of the URL passed to
Server.transfer(), and then pull them out again in the next page.
This has a number of problems including the following:
- I have to manually marshall the state to and from a string
representation.
- The query string is limited in length.
The ViewState mechanism almost provides a solution for me. It handles
the marshalling and doesn't have a hard size limit. However, it is
apparent that the designers of the ViewState mechanism did not allow
for the possibility of transfering the contents of view state from one
page to another. I've run into all sorts of problems trying to find
some sort of way to do this. The following things get in the way:
- You can't easily inherit all pages from a common base class.
- View State is unreliable in the Init event.
- The Load event of the Page object fires before the Load event of its
children.
Has anyone found a decent solution to my problem and would they care
to share it?
FYI: HttpSessionState is not an option because the application is
distributed across multiple load blanced web servers that are
controled by a beauacracy that decided the environment doesn't need a
state server. Additionally, unless I don't understand something, a
state server seems to put an artificial limit on the redundancy of the
environment, because it represents a single point of failure.
do not have the option of using the HttpSessionState object. My
current scheme for dealing with this is to convert all the state
values to strings, place them in the query string of the URL passed to
Server.transfer(), and then pull them out again in the next page.
This has a number of problems including the following:
- I have to manually marshall the state to and from a string
representation.
- The query string is limited in length.
The ViewState mechanism almost provides a solution for me. It handles
the marshalling and doesn't have a hard size limit. However, it is
apparent that the designers of the ViewState mechanism did not allow
for the possibility of transfering the contents of view state from one
page to another. I've run into all sorts of problems trying to find
some sort of way to do this. The following things get in the way:
- You can't easily inherit all pages from a common base class.
- View State is unreliable in the Init event.
- The Load event of the Page object fires before the Load event of its
children.
Has anyone found a decent solution to my problem and would they care
to share it?
FYI: HttpSessionState is not an option because the application is
distributed across multiple load blanced web servers that are
controled by a beauacracy that decided the environment doesn't need a
state server. Additionally, unless I don't understand something, a
state server seems to put an artificial limit on the redundancy of the
environment, because it represents a single point of failure.