This is a migrated thread and some comments may be shown as answers.

Page viewstate lost after a period of time

3 Answers 120 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mohamed
Top achievements
Rank 2
Mohamed asked on 16 Oct 2011, 04:36 PM
I have a web application which use telerik controls.
I'm using viewstate compression

In web.config:
-----------------
<httpModules>
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
</httpModules>

 <modules runAllManagedModulesForAllRequests="true">
   <remove name="RadCompression" />
   <add name="RadCompression" type="Telerik.Web.UI.RadCompression"
    preCondition="integratedMode" />
  </modules>

In browser file:
------------------
 <browser refID="Default">
        <controlAdapters>
            <adapter controlType="System.Web.UI.Page"
                     adapterType="Telerik.Web.UI.RadHiddenFieldPageStateCompression"/>
           <!-- <adapter controlType="System.Web.UI.Page"
                     adapterType="Telerik.Web.UI.RadSessionPageStateCompression"/>-->
        </controlAdapters>            
    </browser>

The problem is when open a web page and do some actions like building a grid or filling RadComboBox, and then wait while doing nothing in the page (receive a call as i work in a call center and filling the data from this call) after about 10 minutes the page lost its data that has been filled (ComboBox items disappear and RagGrid rows disappear completely).

The page seems to be come from the server without running the load event at least.

This happened in many pages around the web application.

I Hope you can help me cause I'm stuck in it.

Thank you.

3 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 19 Oct 2011, 07:39 AM
Hello Mohamed,

I have reviewed your code, but unfortunately we cannot reproduce the problem in our local tests. Therefore in order to investigate further what is causing it we will need a runnable sample which illustrates it. Let me know if it will be possible for you to provide such page.

As temporary workaround you can try to compress the viewstate in session instead of using the hidden field compression and see if that produces the same problem in your scenario (for more details refer to this help article).

I hope this helps.

Regards,
Martin
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
0
Mohamed
Top achievements
Rank 2
answered on 19 Oct 2011, 09:01 AM
Thank you

Saving view state in session will keep it until the session expires (20 min by default).

I found the solution in the article you have sent.
This helped me
<
system.web>
   <browserCaps>
      <case>
             RequiresControlStateInSession=true
       </case>
    </browserCaps>
</
system.web>

And I have RadWindows less 15 but I need to increase the number of windows because I open many pages at the same time, and every page has many windows.

<
system.web>
   <sessionPageState historySize="30" />
</
system.web>

Thank you.
0
David
Top achievements
Rank 1
answered on 11 Oct 2012, 10:31 AM
The problem might be you have SessionStatePageCompression on .Browser config file try using HiddenFieldStatePageCompression.... 

SessionsPageState have a queue that might be lost previous state after a few postbacks...
Tags
Ajax
Asked by
Mohamed
Top achievements
Rank 2
Answers by
Martin
Telerik team
Mohamed
Top achievements
Rank 2
David
Top achievements
Rank 1
Share this question
or