ViewState lost when using RadSessionPageStateCompression

7 posts, 0 answers
  1. Alexander
    Alexander avatar
    3 posts
    Member since:
    Oct 2011

    Posted 24 Oct 2011 Link to this post

    We have an ASP.NET 4 web app and we are using RadSessionPageStateCompression by configuring it in the BrowserFile.browser file like this:
    
    <browsers>
      <browser refID="Default">
        <controlAdapters>
          <adapter controlType="System.Web.UI.Page" adapterType="Telerik.Web.UI.RadSessionPageStateCompression, Telerik.Web.UI, Version=2011.2.712.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" />
        </controlAdapters>
      </browser>
    </browsers> When working in just one tab in the browser ViewState is OK. When working in several tabs (IE 8/9, Chrome 14.x) part of the ViewState is lost. Can you advice what is wrong? Regards, alexander
  2. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 26 Oct 2011 Link to this post

    Hello Alexander,

    How do you identify part of the ViewState is lost? Are you getting ViewState deserialization exceptions of some sort, or the data in your ViewState is lost? If you are getting any errors, can you, please, post the error message and stack trace, so that we can try to identify what's causing the issue. Also, are you getting this in development, or when running on production environment. If the latter, are you, by any chance, using any webfarm / load-balancing scenarios with multiple nodes?

    Any further info you believe might be helpful is appreciated.

    Greetings,
    Veli
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Alexander
    Alexander avatar
    3 posts
    Member since:
    Oct 2011

    Posted 26 Oct 2011 Link to this post

    Hi,

    Just data stored in the ViewState is lost. See example:

    1. Tab1 - during initial load of the page (not post back) we execute ViewState["text"] = "Hello World";
    2. Open new Tab2 and perform some actions, go to other web pages...
    3. Go back to Tab1 and click a button -> perform postback. When checking ViewState["text"], it returns null instead of "Hello World"

    This can be reproduced in ASP.NET Development Server as well in IIS 6.0 production environment (no web farm or other NLB scenario).

    Regards,

    Alexander
  5. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 26 Oct 2011 Link to this post

    Hi Alexander,

    I tried to reproduce the scenario you are describing in a test project but I couldn't succeed. I am attaching the test project. Can you, please, run it locally on your side and try to reproduce this issue in it. Let me know of the exact steps you took so that we can try it locally too.

    Veli
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  6. Alexander
    Alexander avatar
    3 posts
    Member since:
    Oct 2011

    Posted 26 Oct 2011 Link to this post

    Hi,

    By using two different tabs I meant browser tabs, not the telerik:RadTab control as you have included in your example.

    Regards,

    Alexander

     
  7. Veli
    Admin
    Veli avatar
    2002 posts

    Posted 26 Oct 2011 Link to this post

    Hi Alexander,

    Thanks for clarifying. In any case, we are not able to reproduce this issue locally. If the issue persists, consider opening a regular support ticket where you can send us some test project we can debug locally. At this point, we need to be able to reproduce this issue on our side to advise  you further.

    Veli
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  8. David
    David avatar
    2 posts
    Member since:
    Oct 2012

    Posted 11 Oct 2012 Link to this post

    RadSessionPageStateCompression is a implementation of SessionStatePagePersister which does not work properly across multiple tabs because uses a queue of state on witch they get lost after few postbacks. You could switch to HiddenFieldPageStateCompression or re size on web config section system.web  sessionPageState the historySize.


Back to Top
UI for ASP.NET Ajax is Ready for VS 2017