locked
SessionPageStatePersister RRS feed

  • Question

  • User-1142557098 posted

    Hi

    Trying to use SessionPageStatePersister. Session is currently managed through Windows State server.

    Can some one point in  the right direction as to this implementation.

    Thanks.

    Tuesday, December 18, 2012 1:59 PM

Answers

  • User541108374 posted

    Hi,

    (1) Is it possible to use SessionPageStatePersister when the state mgmt is done using an out of process windows state server (NOT SQL server)

    Why not. Simply configure it so. You need to make sure however that everything is serializable. A common mistake people make when moving from InProc to out off process.

    (2) If yes is there a sample  i can look at

    You already found the example for SQL Server. Now simply configure your application to put session state in windows state server and the rest should be equal. (http://msdn.microsoft.com/en-us/library/ms178586(v=vs.100).aspx).

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2012 2:04 AM
  • User-861818263 posted
    <configuration>
        <system.web>
            <browserCaps>
                <case>RequiresControlStateInSession=true</case>
            </browserCaps>
        </system.web>
    </configuration>
    
    OR On page
    
    protected override PageStatePersister PageStatePersister
    {
        get
        {
            return new SessionPageStatePersister(this);
        }
    } 


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2012 2:20 AM

All replies

  • User541108374 posted

    Hi,

    what is your question exactly? What are you having problems with? Can you show the relevant parts of the configuration in the web.config?

    Grz, Kris.

    Tuesday, December 18, 2012 3:15 PM
  • User-1142557098 posted

    Hi

    I am actually trying to reduce the page size in the app.

    Tried other stuff like compression etc ..was helpful to certain extent only.

    Now wanted to try SessionPageStatePersister. I have seen some examples of this but nothing specific as to how it could be used in conjunction with windows state server (seen an example referring to sql server state mgmt).

    (1) Is it possible to use SessionPageStatePersister when the state mgmt is done using an out of process windows state server (NOT SQL server)

    (2) If yes is there a sample  i can look at

    Thanks

    Tuesday, December 18, 2012 6:03 PM
  • User541108374 posted

    Hi,

    (1) Is it possible to use SessionPageStatePersister when the state mgmt is done using an out of process windows state server (NOT SQL server)

    Why not. Simply configure it so. You need to make sure however that everything is serializable. A common mistake people make when moving from InProc to out off process.

    (2) If yes is there a sample  i can look at

    You already found the example for SQL Server. Now simply configure your application to put session state in windows state server and the rest should be equal. (http://msdn.microsoft.com/en-us/library/ms178586(v=vs.100).aspx).

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2012 2:04 AM
  • User-861818263 posted
    <configuration>
        <system.web>
            <browserCaps>
                <case>RequiresControlStateInSession=true</case>
            </browserCaps>
        </system.web>
    </configuration>
    
    OR On page
    
    protected override PageStatePersister PageStatePersister
    {
        get
        {
            return new SessionPageStatePersister(this);
        }
    } 


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 19, 2012 2:20 AM
  • User-1142557098 posted

    Hi

    In my page

    •  if I use the following code  without making any other changes where will the view state be stored (by default)?
    • Also will I be required to make any specific implementations to recycle the session (holding viewstate info)
    • We already have state server session in place ..will this piece of code automatically make use of that

    protected override PageStatePersister PageStatePersister {     get     {         return new SessionPageStatePersister(this);     } }

     

    Thanks

    Thursday, January 3, 2013 6:13 PM