Unable to read storage content. Could not find file

10 posts, 0 answers
  1. pio
    pio avatar
    3 posts
    Member since:
    May 2014

    Posted 13 May 2015 Link to this post

    I've used RadPersistenceManager and follow the following guide :

    http://demos.telerik.com/aspnet-ajax/persistence-framework/examples/custom-storage-provider/defaultcs.aspx

    Everything work fine in my machine and development server, but on  production  the below exception occurred, even the cookie is created on the client machine:

     

    Title: xxxx.aspx, xxxxx Method Name:
    Unable to read storage content. Could not find file
    'C:\inetpub\wwwroot\XXXX\App_Data\TelerikAspNetRadControlsPersistedState'.

    Exception:    at
    Telerik.Web.UI.PersistenceFramework.AppDataStorageProvider.LoadStateFromStorage(String
    key)    at  Telerik.Web.UI.RadPersistenceManager.LoadState()    at GraphicalUserInterface.JobBasket.LoadGridJobBasket()

     

     

    The cookie is created on the client machine

     

  2. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 18 May 2015 Link to this post

    Hi,

    This means that you have not set the cookie storage provider in the code-behind. Please double check that.

    Regards,
    Daniel
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. pio
    pio avatar
    3 posts
    Member since:
    May 2014

    Posted 24 May 2015 in reply to Daniel Link to this post

    Thanks Daniel,

     

    The different between the demo and my example that I need to load the persistence configurations on page load instead of load button. so it seems some times the CookieStorageProvider not initiated in Page_Init, so I added it in page_load instead.

     

    Kindly advice if there is no effect in this solution.

  5. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 28 May 2015 Link to this post

    Hi,

    Moving the loading logic as described should not cause an inconsistency in the behavior. Considering the aforementioned I would kindly like to ask you to share with us the markup and code-behind of the page so we could research what may be causing this issue.

    Regards,
    Angel Petrov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. John
    John avatar
    43 posts
    Member since:
    Aug 2014

    Posted 30 Jul 2015 in reply to Angel Petrov Link to this post

    What Telerik version are you using?  Apparently, 2015Q2 is buggy with respect to the Persistent Framework.  I have two VS Solutions, one running 2014Q2, and one running 2015Q2.  Using copies of the same Content Page and associated code-behind, Persistence works, for me, in 2014Q2; but, not 2015Q2.

     

     

  7. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 04 Aug 2015 Link to this post

    Hi John,

    Could you please elaborate more on what problems are you experiencing? Maybe we can provide a solution for them.

    Regards,
    Angel Petrov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  8. John
    John avatar
    43 posts
    Member since:
    Aug 2014

    Posted 04 Aug 2015 in reply to Angel Petrov Link to this post

    To elaborate,I was specifically getting an error upon Build of my web app:  "The name 'RadPersistenceManager1' does not exist in the current context".  The app doesn't complain until I do a Build.  Then, I get the blue squiggly line under RadPersistenceManager1 in code-behind.  In another thread, I found that if I 'View In Browser' the aspx page, I can circumvent the pre-build process.  It then gives me a runtime error:  Unable to read storage content. Could not find file 'c:\...\visual studio 2013\Projects\...\App_Data\TelerikAspNetRadControlsPersistedState'.

     

    However, since my last post, I came to realize that it wasn't necessarily a version-difference problem.  RadPersistenceManager worked when I created a new VS Solution, regardless of the Telerik version.  I tried both Q3 2014 and Q2 2015 in the existing Solution and the new test Solution.  I'm not sure what the Persistence Framework did not like about current VS Solution; but, my work-around for now, is to create a fresh VS Solution then add (import) my existing code/projects.

     

     

  9. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 07 Aug 2015 Link to this post

    Hello John,

    In most of the cases problems like the described occur when the CodeBehind is mistaken with CodeFile in the page directive. CodeFile is normally used in Web Sites whereas the CodeBehind in Web Applications(which required a build).

    Since you mentioned that you hare resolved the matter I suggest moving the logic inside the new solution which will not throw errors.

    Regards,
    Angel Petrov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  10. John
    John avatar
    43 posts
    Member since:
    Aug 2014

    Posted 07 Aug 2015 in reply to Angel Petrov Link to this post

    The Project was originally created as a website, which was recommended early-on by one of the Telerik Support people.  Where, they said that it would be easier to deal with than a web app.  As, such my Page Directives use CodeFile.  Since my last post, I've created a new Solution and moved everything over; it seems to be working fine now, with no runtime errors and no blue squiggly lines.

     

    I do have another RadPersistenceManager issue, as it relates to Page_Load/Unload; but, not sure which forum thread to post.  It was recommended to me, on Stack Overflow, to use Page_Load to assign the StorageProviderKey and execute LoadState(), then use Page_Unload to execute SaveState().  I have a RadTabStrip, with (3) tabs, each with a RadGrid.  My PersistenceSettings identify each RadGrid.  If I simply go into the first tab, make a filter or sort change to the grid, close the page, it saves the filter and sort settings, as it's supposed to.  So far, it works great.   Where things go bad and where it gets complicated is when I click to another tab, or select another Sort column, or filter on a second column.  My Page feels that it needs to Page_Load on each of those; therefore, reloading the saved ViewState.  Besides resetting my filter & sort expressions, it's also a performance problem.  I shouldn't  have to go back to the server and pull data again.  It should handle filters & sorts on the client -side...I would think.

     

    So, two questions ...

    1) How can I reduce the number of client/server round-trips on a page with multiple tabs & grids?

    2) What is Telerik's recommended way of when/where/how to execute LoadState & SaveState?

     

    Thanks in advance.

    -john-

     

  11. Angel Petrov
    Admin
    Angel Petrov avatar
    1006 posts

    Posted 12 Aug 2015 Link to this post

    Hi John,

    Regarding to the queries.
    1. Generally if you do not set the RenderSelectedPageOnly property of the multi page to false the controls inside the multi-pages will be initialized and by switching the tabs you should not initiate a postback. As for reducing the grid postbacks you can modify the control logic so that client-side binding is used. That way complex operations such as filtering, sorting and etc will not cause a round-trip to the server.
    2. There is no guideline that one can follow. One can save load the settings according to its requirements. As long as the control can recreate correctly when loading the settings all should be working fine. The general solution indeed would be the use the page load/unload events which are fired when the page initialized(early enough to load the settings) and when the controls are fully initialized(to save the settings).

    Regards,
    Angel Petrov
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017