Upload failed

4 posts, 0 answers
  1. Helge
    Helge avatar
    2 posts
    Member since:
    Oct 2011

    Posted 01 Feb 2012 Link to this post

    Hi,

    I'm using the Upload control to upload files via a SharePoint site to the server's file system.

    The client that I've implemented this for recently experienced problems with uploading two files:
    "Handler not found or execution of the handler failed!
    [HttpWebRequest_WebException_RemoteServer]
    Arguments: NotFound
    Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose...
    Check RadUpload's BufferSize property remarks.
    "

    Code:
    <telerik:RadUpload UploadServiceUrl="/_layouts/NorConsult.FTPUpload/UploadHandler.ashx"
                            TargetPhysicalFolder="c:\_source\ScratchFolder\"
                            Height="284"
                            HorizontalAlignment="Left"
                            Margin="8,9,0,0"
                            Name="RadUpload2"
                            VerticalAlignment="Top"
                            MaxFileCount="100"
                            Width="590"
                            OverwriteExistingFiles="True"
                            HorizontalContentAlignment="Left"
                            IsAppendFilesEnabled="True"
                            IsAutomaticUpload="False"
                            IsMultiselect="True"
                            MaxUploadSize="5000000000"
                            MaxFileSize="2000000000"
                            FileTooLarge="RadUpload1_FileTooLarge"
                            FileUploaded="radUpload_FileUploaded"
                            FileUploadFailed="RadUpload2_FileUploadFailed"
                            UploadFinished="RadUpload2_UploadFinished"
                            Grid.RowSpan="2">
                        </telerik:RadUpload>



    // HttpHandler
    public override bool SaveChunkData(string filePath, long position, byte[] buffer, int contentLength, out int savedBytes)
            {
                bool ret = base.SaveChunkData(filePath, position, buffer, contentLength, out savedBytes);
                 
                if (this.IsFinalFileRequest())
                {
                    string fileNameDrop = Constants.Path_ScratchArea + this.GetFileName();
                    string fileNameFinal = Constants.Path_ScratchArea + @"Ready\" + this.GetFileName();
     
                    if (File.Exists(fileNameFinal))
                    {
                        File.Delete(fileNameFinal);
                    }
     
                    File.Move(fileNameDrop, fileNameFinal);
                }
     
                return ret;
            }

    Thanks for any pointers to what could be wrong!
  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 06 Feb 2012 Link to this post

    Hi Helge,

     Could you please elaborate more on your scenario? What are the uploaded files' sizes? Can you confirm that this happens with small files? Are you able to successfully navigate to your UploadHandler ? Is it possible for you to send us an isolated sample reproducing this issue? We could change this ticket's type to GeneralFeedback and you will be able to attach files , is this suitable for you ?

    Kind regards,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  3. DevCraft banner
  4. Helge
    Helge avatar
    2 posts
    Member since:
    Oct 2011

    Posted 16 Feb 2012 Link to this post

    Hi,

    We haven't been able to reproduce this error on smaller files. The minimum file size we've tested on and which the error occurs is 400MB.
    It usually occurs about half way through the upload process. So, at least, files over 400MB fail every time.

    I think it would be difficult to assemble everything you would need to be able to run my code. This project is pretty complex (the uploader is just a small part of the project... yet central and very important). It runs in SharePoint 2010.

    I tried setting the BufferSize="50000", but that did not help.
  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 20 Feb 2012 Link to this post

    Hello Helge ,

     Could you please check out your web.config file and especially the maxRequestLength property:

    <configuration>
        <system.web>
            <httpRuntime  maxRequestLength="10000000" executionTimeout="3600" />
            <compilation debug="true" targetFramework="4.0" />
        </system.web>
    </configuration>
    Please let us know if increasing it helped you or not.

    Kind regards,
    Petar Mladenov
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
Back to Top