locked
File Upload Issues RRS feed

  • Question

  • User661555364 posted

    Hi,

    I have a C# webforms project that allows users to upload audio files to our system.

    The majority of these uploads work fine but we're getting numerous errors every day and thought I'd ask here in case anyone has any ideas.

    Warning emails containing the stack trace are sent to use automatically, so it's difficult to reproduce the errors ourselves.

    Email #1

    Error Url: https://www.ourwebsite.com/AjaxFileUploadHandler.axd?contextKey=%7BBA8BEDC8-B952-4d5d-8CC2-59FE922E2922%7D&controlID=cphPageContent_ModalAudio_AjaxFileUpload&fileId=AC0A81E2-6E02-B9B6-074C-22BD4FEF9293&fileName=example.MP3&chunked=true&firstChunk=false

    Exception Type: System.Web.HttpException

    Stack Trace

    at System.Web.HttpBufferlessInputStream.Read(Byte[] buffer, Int32 offset, Int32 count) at AjaxControlToolkit.AjaxFileUploadHelper.ProcessStream(HttpContext context, Stream source, String fileId, String fileName, Boolean chunked, Boolean isFirstChunk, Boolean usePoll) at AjaxControlToolkit.AjaxFileUploadHelper.Process(HttpContext context) at AjaxControlToolkit.AjaxFileUploadHandler.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Email #2 (sent immediately after)

    Error Url: https://www.ourwebsite.com/upload_audio?contextKey=%7BBA8BEDC8-B952-4d5d-8CC2-59FE922E2922%7D&controlID=cphPageContent_ModalAudio_AjaxFileUpload&done=1&guid=7051112B-A4DB-CB20-5546-360E0975A267&id=11234

    Inner Exception Type: System.IndexOutOfRangeException

    Inner Exception: There is no row at position 0.

    Inner Source: System.Data

    Inner Stack Trace

    at System.Data.RBTree`1.GetNodeByIndex(Int32 userIndex) at Controllers.AudioController.Update.UploadComplete(String thisId, String myWindow, String thatId, String filesize, String notes) at UserControls.ModalAudio.AjaxFileUpload_UploadComplete(Object sender, AjaxFileUploadEventArgs e) at AjaxControlToolkit.AjaxFileUpload.UploadRequestProcessor.XhrDone(String fileId) at AjaxControlToolkit.AjaxFileUpload.UploadRequestProcessor.ProcessRequest() at AjaxControlToolkit.AjaxFileUpload.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

    Stack Trace

    at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.upload_audio_aspx.ProcessRequest(HttpContext context) in c:\windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\1e59898f\87cca7e3\App_Web_5saj2qnr.18.cs:line 0 at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    Has anyone seen this kind of issue before?

    EDIT: It appears this happen mostly with WAV and MOV files (I can't guarantee the above MP3 was actually in MP3 format).

    Thursday, May 23, 2019 8:37 AM

All replies

  • User288213138 posted

    Hi  DevGuyUk,
     
    Which of your code is wrong? the error message should include the line of the error.

    About the file upload problem, the usual problem is that the file is too large.


    You can try to modify the value of maxRequestLength in the web.config file.

    <configuration>       
         <system.web>       
              <httpRuntime targetFramework="4.6.1" maxRequestLength="" executionTimeout="" />
         </system.web>       
      <configuration>

    Since I haven't seen your code, please post your code so that we can give you a more professional reply.

    Best Regards,

    Sam

    Friday, May 24, 2019 3:27 AM