Cannot deserialize dialog parameters

9 posts, 0 answers
  1. Andreas Kaech
    Andreas Kaech avatar
    121 posts
    Member since:
    Sep 2004

    Posted 10 Jun 2009 Link to this post

    Hi Telerik,
    I want also edit after Postback (save the content). But then, when opening any dialog, the following error occurs:

    Cannot deserialize dialog parameters. Please refresh the editor page.

    What to do?

    Thanks for answering.
    Andreas


  2. Rumen
    Admin
    Rumen avatar
    12846 posts

    Posted 10 Jun 2009 Link to this post

    Hello Andreas,

    We had to change the way dialog parameters are serialized due to a security issue in a previous release of the RadControls for ASP.NET AJAX. The parameters are now using a random key each time the application is restarted. This means that if you leave a page in the browser and the application is restarted, the spell dialog will stop working after that, because the encryption key has changed.

    In any case, you can force a specific encryption key for the editor/spell dialogs with the following application setting in your web.config:

    <appSettings>  
        <add key="Telerik.Web.UI.DialogParametersEncryptionKey" value="46_byte_encryption_key_of_your_choosing......."/>  
    </appSettings> 

    This way the dialogs will always use the same key and you will not see the "cannot deserialize..." error even after the application is restarted. The same workaround is used if you are hosting your application in a web farm scenario where multiple web servers are used to handle page requests.

    All the best,
    Rumen
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Eirik
    Eirik avatar
    46 posts
    Member since:
    Apr 2007

    Posted 02 Oct 2009 Link to this post

    Hi. I'm also having this problem. How do I generate a 46 byte encyption key, and how many chacaters is this?
  5. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 05 Oct 2009 Link to this post

    Hello Eirik,

    You can use any combination of letters and numbers - the key has no specific format. 46 bytes is 46 characters. For example:

    "2u4kjbfoiuhtk2lh4bgl4i2gbvhjbajhbk3jhtrgkjhrtgkjf324"


    Best wishes,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  6. Mike
    Mike avatar
    18 posts
    Member since:
    Mar 2008

    Posted 29 Oct 2009 Link to this post

    The sample given here is 52 characters not 46.   How long does this encryption key have to be?

    I have this problem too.  It only affects the Properties dialog for an existing image.   The Web Application is not being restarted and I am not using a web farm.   And, the solution above doesn't work!   I have tried various lengths of key but the error persists no matter what I try.  I am fairly sure this only started after installing 2009.2.826.35.

    MIke
  7. Andreas Kaech
    Andreas Kaech avatar
    121 posts
    Member since:
    Sep 2004

    Posted 29 Oct 2009 Link to this post

    Hello Mike,
    with a GUID, it works in my application - but don't ask me, why ;-)

    <appSettings> 
       <add key="Telerik.Web.UI.DialogParametersEncryptionKey" value="6DC4AD6A-63D6-4db9-A3FB-3A8C39A6846D"/>  
    </appSettings> 

    Andreas
  8. Mike
    Mike avatar
    18 posts
    Member since:
    Mar 2008

    Posted 29 Oct 2009 Link to this post

    I have tried a variety of keys at different lengths, including a GUID, but none cure the problem.  

    I have a colleague with the same problem.  He's found if he enters a 45 character key it works but 46 it doesn't.

    For me it is only the Image Properties dialog which has a problem.  All the other dialogs work fine with or without the web.config changes.  I don't think the encryption key has anything to do with it.   It is just a bug introduced in the 2009.2.826.35 version and once it's fixed we'll all be happy again.

    Mike  
  9. Lini
    Admin
    Lini avatar
    2144 posts

    Posted 03 Nov 2009 Link to this post

    Hello,

    As I said before, the key has no specific format. It can be any length - 10, 20, 50, etc. characters. Naturally, the longer the key, the more secure it is.

    As for the Image Properties dialogs, I think the problem there could be coming from the dialog title, which is also part of the dialog URL. The dialog title is "Properties..." and some firewalls do not like the three consecutive dots. To verify if this is the case, try setting a different title for the dialog from the code file of the RadEditor page:

    protected void Page_Load(object sender, EventArgs e)
    {
        RadEditor1.Localization.Tools.SetImageProperties = "Properties";
    }

    where RadEditor is your editor instance.

    All the best,
    Lini
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  10. Mike
    Mike avatar
    18 posts
    Member since:
    Mar 2008

    Posted 03 Nov 2009 Link to this post

    Sorry I forgot to say I'd fixed this.   It was the title.   I was checking for ".." in the URL and removing them to stop people moving up through the folder tree.   Since IIS now does this I don't need it in my application too and once I'd removed it everything worked fine.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017