Ajax error on radimageeditor server side save

2 posts, 0 answers
  1. Robby
    Robby avatar
    3 posts
    Member since:
    Aug 2011

    Posted 08 Jan 2014 Link to this post

    Receiving the following error:

    JavaScript runtime error: Sys.ArgumentException: Cannot deserialize empty string

    Parameter name: data

    The custom save javascript does the following:

    var fileName = imageEditor.get_serverImageUrl();

    imageEditor.saveImageOnServer(fileName, true);

    The server-side code is as follows:

    If e.FileName <> "" Then

       Dim img As ImageEditor.EditableImage = e.Image.Clone()

       Dim strFilePath As String = Server.MapPath(e.FileName)

       e.OverwriteFile = True


       e.Cancel = True

    End If

  2. Vessy
    Vessy avatar
    2214 posts

    Posted 13 Jan 2014 Link to this post

    Hello Robby,

    Such an error could be experienced if you are trying to save a big image when the ImageEditor is used in enabled CanvasMode. If this is the case, you can fix this by configuring the size of the allowed JSON string length:
    <telerik:RadImageEditor ID="RadImageEditor1" runat="server" ImageUrl="Tulips.jpg">
        <EditableImageSettings MaxJsonLength="4097152" />
    The value in the example is almost double the default value and you could go with it in your project, or increase it if needed.

    In case this does not help in solving the case I will need to ask you for a sample project reproducing the issue, so we could examine it on our side.

    Veselina Raykova
    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 the blog feed now.
Back to Top