This is a migrated thread and some comments may be shown as answers.

Upload failed

3 Answers 102 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Helge
Top achievements
Rank 1
Helge asked on 01 Feb 2012, 02:13 PM
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!

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 06 Feb 2012, 10:54 AM
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 >>
0
Helge
Top achievements
Rank 1
answered on 16 Feb 2012, 02:20 PM
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.
0
Petar Mladenov
Telerik team
answered on 20 Feb 2012, 07:16 PM
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 >>
Tags
Upload
Asked by
Helge
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Helge
Top achievements
Rank 1
Share this question
or