RadUpload errors after uploading file

9 posts, 0 answers
  1. SSN
    SSN avatar
    6 posts
    Member since:
    Sep 2008

    Posted 14 Jan 2009 Link to this post

    Hi,

    We are using RadUpload and getting error when we hit upload button, and the header says uploading... with 0% but displays correct file size and RadUpload even loads file to the destination folder.
    We could not receive any handle to upload button click event or uploadfinished event.
    The error message is as below:
    Unhandled error in silverlight 2 application
    code:4004
    Category: ManagedRuntimeError
    Message: System.Collections.Generic.KeyNotFoundException:The given key was not present in the dictionary.
    at System.ThrowHelper.ThrowKeyNotFoundException()
    at System.Collections.Generic.Dictionary'2.get_Item(TKey key)
    at Telerik.Windows.Controls.FileUploader.OnResponse(IAsyncResult asyncResult)
    at System.Net.BrowserHttpWebRequest.<>c_DisplayClass.............

    Please let me know if there is any issue with the release version. We use 2008.3.1117.1020 version of Controls.Input and
    2008.3.1117.20 version of RadUploadHandler.dll.

    Thanks,
    S.Subbu.
  2. Valentin.Stoychev
    Admin
    Valentin.Stoychev avatar
    2198 posts

    Posted 15 Jan 2009 Link to this post

    Hi S.Subbu,

    we are not aware of such a problem with this version of Rad Upload for Silverlight.

    Are you by any chance using a custom upload handler, or are you playing with custom parameters to/from the upload handler? Can you elaborate more on your setup.

    Thanks!

    All the best,
    Valentin.Stoychev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. DevCraft banner
  4. SSN
    SSN avatar
    6 posts
    Member since:
    Sep 2008

    Posted 15 Jan 2009 Link to this post

    Hi,
    We have the handler as below:

    <%

    @ WebHandler Language="VB" Class="RadUploadHandler" %>

     

    Imports

    System

     

    Imports

    System.Web

     

    Public

    Class RadUploadHandler

     

     

    Inherits Telerik.Windows.RadUploadHandler

     

     

     

    End

    Class

     


    Before applying the new version, we were able to proceed.
    RadUpload in xaml is as below:

    <

    Telerik:RadUpload x:Name="UploadFiles"

     

     

    TargetFolder="Upload/UploadedFiles"

     

     

    Filter="Excel files (*.xls)|*.xls|Text Files (*.txt)|*.txt"

     

     

    FilterIndex="0" IsAutomaticUpload="false" OverwriteExistingFiles="True" IsMultiselect="False"

     

     

    HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="3" Grid.Column="0" Grid.ColumnSpan="3" Height="100" />

    Thanks,
    S.Subbu.

     

  5. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 16 Jan 2009 Link to this post

    Hi SSN,

    Looking at xaml-code RadUpload definition I can not find the initialization of the UploadServiceUrl property - there should be something like:

    UploadServiceUrl="http://localhost/RadUploadExample/MyRadUploadHandler.ashx"

    if this is not the issue - i.e. you initialize this property in the code-behind please prepare a simple project where the error occurs and send it to us for further investigation. We we get back to you with our findings shortly.

    Greetings,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. SSN
    SSN avatar
    6 posts
    Member since:
    Sep 2008

    Posted 19 Jan 2009 Link to this post

    Hi,
    We have UploadServiceUrl in the code behind as below:

    string temp;
    temp="";
    ap.HostAddress = (string)System.Windows.Browser.HtmlPage.Window.Invoke("GetHostAddress", temp).ToString();
    HoldRadUpload.UploadServiceUrl = "http://" + ap.HostAddress + "/RadUploadHandler.ashx";

    and in ashx

    <%@ WebHandler Language="VB"  Class="RadUploadHandler" %>
    Imports System
    Imports System.Web

    Public Class RadUploadHandler
        Inherits Telerik.Windows.RadUploadHandler
           
    End Class

    Thanks,
    S.Subramanian.

  7. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 20 Jan 2009 Link to this post

    Hello SSN,

    After your last message about the issue I will suggest research on the following:


    • If this is not the case please try to access the upload handler directly in your web-browser and check whether the response looks like:
      {"JSONData":[{"Key":"RadUAG_message","Value":"Empty file name"},{"Key":"RadUAG_success","Value":false}]}

    • If the response is OK please check whether the target folder is physically available and the access rights are ok.

    Kind regards,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  8. SSN
    SSN avatar
    6 posts
    Member since:
    Sep 2008

    Posted 20 Jan 2009 Link to this post

    Hi Ivan,

    With the upload control we were able to browse a file, click upload button which actually uploads the file into the target folder and after that it fails to return the event handler(completed events).

    As you suggested I'll check the cross domain and the key RadUAG_message.

    Thanks,
    S.Subbu.

  9. Juan Puebla
    Juan Puebla avatar
    3 posts
    Member since:
    Aug 2009

    Posted 27 Aug 2009 Link to this post

    I have de same problem. Did you found a solution?
  10. Ivan
    Admin
    Ivan avatar
    519 posts

    Posted 28 Aug 2009 Link to this post

    Hi SSN,

    If want to get more specific details about RadUpload please review this article where the postprocessing of uploaded files is discussed.

    All the best,
    Ivan
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Back to Top
DevCraft banner