json error uploading file with AsyncUpload

11 posts, 0 answers
  1. Ira
    Ira avatar
    4 posts
    Member since:
    Sep 2006

    Posted 15 Dec 2016 Link to this post

    I am using RadAsyncUpload as follows:

    <telerik:RadAsyncUpload ID="radUpload1" runat="server" AllowedFileExtensions=".wav,mp3"
        AllowedMimeTypes="audio/wav,audio/x-wav,audio/mpeg,audio/mp3" ControlObjectsVisibility="None" MaxFileInputsCount="1" OverwriteExistingFiles="True"
        ReadOnlyFileInputs="True" Width="400px" PostbackTriggers="btnUpload" OnFileUploaded="radUpload1_FileUploaded" Localization-Select="Browse"
        OnClientFileUploadFailed="OnClientFileUploadFailed" OnClientValidationFailed="OnClientValidationFailed">
    </telerik:RadAsyncUpload>

    When I run my website on my development server it works file. When I copy the website to my production server with the exact save configuration and upload a file, it gets "stuck" on the upload with yellow blinking graphic and the following error in the web site console:

    Uncaught SyntaxError: Unexpected token < in JSON at position 0
        at JSON.parse (<anonymous>)
        at Function.m.parseJSON (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager1_TSM&compress=1&_TSM_CombinedScri…:3389)
        at g.callback (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager1_TSM&compress=1&_TSM_CombinedScri…:17069)
        at XMLHttpRequest.m (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=radScriptManager1_TSM&compress=1&_TSM_CombinedScri…:17180)

     

    I have run http://login.connectmevoice.com/Telerik.Web.UI.WebResource.axd and I get a blank page so I know it's registered correctly. Any idea on what the issue can be?

    Thank you.

     

     

  2. Ira
    Ira avatar
    4 posts
    Member since:
    Sep 2006

    Posted 15 Dec 2016 in reply to Ira Link to this post

    FYI, both servers at running Windows Server 2012 R2 IIS8
  3. Peter Milchev
    Admin
    Peter Milchev avatar
    206 posts

    Posted 20 Dec 2016 Link to this post

    Hello Ira,

    Similar errors are encountered when not all handlers are configured correctly. Unfortunately, the provided information is insufficient for us to pinpoint the exact problem. Here are some resources that might be helpful: 
    If that does not help solving the issue, would you please send us an isolated sample runnable project with just the AsyncUpload control and the web.config that reproduces the issue? Thus, we would be able to investigate further your exact scenario and help you more efficiently. 

    Regards,
    Peter Milchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Sune Dyrberg
    Sune Dyrberg avatar
    11 posts
    Member since:
    Nov 2008

    Posted 21 Mar in reply to Ira Link to this post

    Hi Ira,

    Did you ever found a solution to this problem. I get the same error when uploading larger files.

    Kind Regards,

    Sune

  5. Peter Milchev
    Admin
    Peter Milchev avatar
    206 posts

    Posted 24 Mar Link to this post

    Hello Sune,

    Here is the Uploading Large Files where the necessary configurations for allowing the upload of larger files are described. 

    Regards,
    Peter Milchev
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  6. Sune Dyrberg
    Sune Dyrberg avatar
    11 posts
    Member since:
    Nov 2008

    Posted 05 Apr in reply to Peter Milchev Link to this post

    Hello Peter

    The error occurs when uploading files larger then 2 MB. When I run on my development server it works fine, but in production the upload hangs with a blinking yellow graphic. And the error is the same as "Ira": 

    Uncaught SyntaxError: Unexpected token < in JSON at position 0...

  7. Vessy
    Admin
    Vessy avatar
    1511 posts

    Posted 10 Apr Link to this post

    Hi Sune,

    Can you, please, make sure that the following configurations are applied to the web.config of your application?
    <configuration>
        <system.web>
            <httpRuntime maxRequestLength="2147483640"/>
        </system.web>
        <system.web.extensions>
            <scripting>
                <webServices>
                    <jsonSerialization maxJsonLength="2147483640"/>
                </webServices>
            </scripting>
        </system.web.extensions>
    </configuration>


    Regards,
    Vessy
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Sune Dyrberg
    Sune Dyrberg avatar
    11 posts
    Member since:
    Nov 2008

    Posted 10 Apr in reply to Vessy Link to this post

    Hi Vessy,

    I have the same configuration but the error still occurs. Any other ideas what could cause the error?

    Regards,

    Sune

  9. Vessy
    Admin
    Vessy avatar
    1511 posts

    Posted 11 Apr Link to this post

    Hi Sune,

    In order to be able to provide you any further assistance on this matter we will need to replicate the problem at our end and examine the problematic configuration leading to it. Please, follow the steps from the following blog post to prepare a runnable test project and send it to us for a further investigation:
    http://www.telerik.com/blogs/isolating-a-problem-in-a-sample-project

    Regards,
    Vessy
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  10. Don
    Don avatar
    4 posts
    Member since:
    Oct 2006

    Posted 5 days and 3 hours ago Link to this post

    I have same exact issue.
    Any fixes?

    And I am publishing to the Windows 2012 server as well.
    When I publish to the Windows 2008 server, it works well.

    I am trying to migrate my apps from old server to new server which is Windows 2012.

    thanks

    Don

  11. Vessy
    Admin
    Vessy avatar
    1511 posts

    Posted 2 days and 6 hours ago Link to this post

    Hi Don,

    Did you try the configuration suggested in one of my previous replies? We were never able to reproduce the problem on our side with these setting applied, so there are no other fixes we can suggest at this point. We will be glad to assist you further on this matter, but we will need to replicate the behavior at hand on our side in order to determine what is causing it. It will be great if you can send us a runnable sample where the issue occurs so we can continue the case investigation.

    Regards,
    Vessy
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top