Error upload on server

2 posts, 0 answers
  1. Tarkan Haser
    Tarkan Haser avatar
    1 posts
    Member since:
    Aug 2009

    Posted 19 Nov 2009 Link to this post


    I've done an application that has a radUpload control. If I try the control in my local machine I'm able to upload, save and open the files. But when I publish the application I try to upload a file and I get the 0% uploading state and the file never gets uploaded.

    Unhandled Error in Silverlight Application 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.Browser.BrowserHttpWebRequest.<>c__DisplayClassd.<InvokeGetResponseCallback>b__b(Object state2)
       at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
       at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)

    I try to upload allready exists file i give an error message that access denied.
    .xaml file:

        Filter="Resim Dosyaları (*.jpg;*.jpeg;*.png)|*.jpg;*.jpeg;*.png|Tüm Dosyalar (*.*)|*.*;" 
        VerticalAlignment="Top" Height="170" Background="#35000000" BorderBrush="White"/>  

    c# code :
    void RadUploadLogo_FileUploadStarting(object sender, FileUploadStartingEventArgs e)  
                //e.FileParameters.Add("Authorized", "True");  
                string fileName = App.appKullaniciTanimi.cKodHesap;  
                int i = e.UploadData.FileName.LastIndexOf('.');  
                if (i >= 0 && i < e.UploadData.FileName.Length)  
                    fileName += e.UploadData.FileName.Substring(i);  
                GonderilenDosya = fileName;  
                e.UploadData.FileName = fileName;  

    MyUploadHandler.ashx :
    using System;  
    using System.Web;  
    using Telerik.Windows.Controls;  
    namespace QuipusBilisimB2B.Web  
        public class MyUploadHandler : Telerik.Windows.RadUploadHandler  
            public override void ProcessStream()  
                string authorized = this.Request.Form["Authorized"];  
                bool isOK = !string.IsNullOrEmpty(authorized) && authorized.ToLower() == "true";  
                //if (!isOK)  
                //    ////this.CancelRequest();  
                //    ////this.Result.Add("Error", "Security token is required.  Please login.");  
                //    ////this.AddReturnParam("Error", "Security token is required.  Please login.");  
                //    this.AddReturnParam(RadUploadConstants.ParamNameMessage, "Security token is required. Please login.");  
                //    string fileName = this.Request.Form[RadUploadConstants.ParamNameFileName];  
                //    string filePath = this.GetFilePath(fileName);  
                //    this.AddReturnParam(RadUploadConstants.ParamNameSuccess, false);  
                //    this.AddReturnParam(RadUploadConstants.ParamNameFileIdent, filePath);  
                //    this.AddReturnParam(RadUploadConstants.ParamNameFileName, fileName);  
                //    this.AddReturnParam(RadUploadConstants.ParamNameFilePath, filePath);  
                //    this.AddReturnParam(RadUploadConstants.ParamNameFinalFileRequest, true);  
                //    return;  
  2. Ivan
    Ivan avatar
    519 posts

    Posted 20 Nov 2009 Link to this post

    Hi Tarkan,

    Thank you for contacting us.

    Could you please follow instructions in the Troubleshooting RadUpload for Silverlight article.

    Of course if the issue persists please contact us again.

    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.
  3. DevCraft R3 2016 release webinar banner
Back to Top