Value cannot be null. Parameter name : key

4 posts, 0 answers
  1. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 08 Apr 2011 Link to this post

    Hi,

    When I press the button Upload I get the error "Value cannot be null".  I've looked everywhere but unable to find the OnFileUploadCompleted and I don't know what to look for. Could you give me a hint on this ?  After the files are selected which they all appear in the list,  There's no errors and nothing seems to be wrong until I press UPLOAD.

    Value cannot be null.
    Parameter name: key
       at System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
       at System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
       at System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
       at Telerik.Windows.Controls.RadUpload.OnFileUploadCompleted(Object sender, EventArgs e)

    Here's the parameters I did set for the RadUpload

    <telerik:RadUpload
        Grid.Column="1" x:Name="RadUpload1" Margin="0"
        Filter="Image Files (*.jpg;*.jpeg;*.png)| *.jpg;*.jpeg;*.png"
        FilterIndex="0" MaxFileCount="500"    
        AllowDrop="true" Width="Auto"
        IsAutomaticUpload="false"
        OverwriteExistingFiles="True"
        UploadServiceUrl="../receiver.ashx"
        IsAppendFilesEnabled="True"
        FileUploadStarting="RadUpload1_FileUploadStarting"
        FileUploaded="RadUpload1_FileUploaded"
        UploadStarted="RadUpload1_UploadStarted"
        MaxFileSize="12000000" MaxUploadSize="900000000" SelectionMode="Multiple" 
        MinWidth="0" MinHeight="0" MaxHeight="Infinity" Style="{StaticResource  
        RadUploadStyle1}" TargetFolder="~/ClientBin/Photos" BufferSize="900000000" />
  2. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 08 Apr 2011 Link to this post

    I did remove the BufferSize I did set and it worked.  Could you explain how I can make this buffer huge without having the error ?
  3. DevCraft banner
  4. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 13 Apr 2011 Link to this post

    Hello Marc Roussel,

    I belive the default POST request buffer size is around 2mb. If you want to use a larger size, then you have to configure the server to be able to accept larger requests. To enable this, you have to add the following line in the web.config file -> system.web section: For example, this will allow 10mb buffer size :

    <httpRuntime maxRequestLength="10000000" executionTimeout="3600" />


    Let me know if that works for you.

    Greetings,
    Alex Fidanov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Marc Roussel
    Marc Roussel avatar
    429 posts
    Member since:
    Dec 2009

    Posted 13 Apr 2011 Link to this post

    Oh thank you.
    Works fine.
Back to Top