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

Cannot deserialize dialog parameters

8 Answers 572 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andreas Kaech
Top achievements
Rank 1
Andreas Kaech asked on 10 Jun 2009, 07:22 AM
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


8 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Jun 2009, 07:35 AM
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.
0
Eirik
Top achievements
Rank 1
answered on 02 Oct 2009, 09:00 AM
Hi. I'm also having this problem. How do I generate a 46 byte encyption key, and how many chacaters is this?
0
Lini
Telerik team
answered on 05 Oct 2009, 12:14 PM
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.
0
Mike
Top achievements
Rank 2
answered on 29 Oct 2009, 12:24 PM
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
0
Andreas Kaech
Top achievements
Rank 1
answered on 29 Oct 2009, 01:52 PM
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
0
Mike
Top achievements
Rank 2
answered on 29 Oct 2009, 02:38 PM
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  
0
Lini
Telerik team
answered on 03 Nov 2009, 01:39 PM
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.
0
Mike
Top achievements
Rank 2
answered on 03 Nov 2009, 01:58 PM
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.
Tags
Editor
Asked by
Andreas Kaech
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Eirik
Top achievements
Rank 1
Lini
Telerik team
Mike
Top achievements
Rank 2
Andreas Kaech
Top achievements
Rank 1
Share this question
or