Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michael Lykke 12 posts 75 karma points
    Jul 03, 2012 @ 10:05
    Michael Lykke
    0

    Failed to load viewstate

    Hi all

    We're running Umbraco 4.7 with Contour and we have a strange and quite annoying issue.

    In a multistep form, after filling out fields on step 1, we click "next" and are taken to step 2. If I click the browsers "Back"-button I go back to step 1 but if I then use the "next" button in the form i get the "Failed to load viewstate" error. Is this normal behaviour?

    I understand why the error occurs (viewstate is saved in a hidden field and in the db (I think) and after submitting the same page twice, Contour gets very confused) but I think that this kind of behaviour (using the browser's back button) is not uncommon which is why I think this error should be resolved before going public with my forms. Is there any workaround, perhaps?

    Hope someone has a solution!

    Best regards,
    Michael

    Full error description:

    "Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request.  For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request"

  • Michael Lykke 12 posts 75 karma points
    Jul 06, 2012 @ 12:43
    Michael Lykke
    0

    Hi again

    After googling "Failed to load viewstate" without "umbraco contour", I found this page: http://www.denisbauer.com/ASPNETControls/DynamicControlsPlaceholder.aspx - which seems to resolve the problem with the viewstate. Does anyone know how to implement this solution in Contour?

    Best regards,
    Michael 

  • Martin Lingstuyl 202 posts 379 karma points
    Oct 03, 2012 @ 13:59
    Martin Lingstuyl
    0

    Hi Michael,

    Did you find a solution in the meantime?

    I'm having the same issue.

    Martin

  • Michael Lykke 12 posts 75 karma points
    Oct 04, 2012 @ 17:39
    Michael Lykke
    0

    Hi Martin

     

    No, and I never pursued the issue when I saw that the link I posted was last updated in 2006. In stead I resolved to enabling custom errors on IIS and made it display a page from Umbraco explaining what to do if the user emcountered this error. I also have a mind to review the error log on IIS to assess if this is even an issue with our users. I just haven't done so yet.

     

    If this indeed is a big issue I know it's possible to disable the viewstate in the master page for the form but this would mean we would have to capture and pass on the contents of the entire form and that means a lot of coding. Which is not the purpose of Contour...

     

    Michael

  • Martin Lingstuyl 202 posts 379 karma points
    Oct 05, 2012 @ 09:55
    Martin Lingstuyl
    0

    Ok, thanks.

    question: did it happen with any form or only with forms having custom FieldTypes?

    (I'm having trouble with customs)

     

    Martin

Please Sign in or register to post replies

Write your reply to:

Draft