Uploadify & ASP.NET Error Handling #2038

362 Views Asked by At

I'm using Uploadify within my ASP.NET 4 project. I'm using an HttpHandler to receive the posted file and process it into a directory. The upload is working fine. However, I wanted to handle any errors I could within my HttpHandler, and I am finding it impossible.

I have the processing of the file wrapped in a try catch, but I am never able to return an error message. I always receive the IO Error: Error #2038

try
{
    UploadFiles(context.Request.Files);
}
catch(Exception ex)
{
    context.Response.Write(ex.Message);
}

Is it not possible to return custom errors back to the client when using SWFUpload/Uploadify?

1

There are 1 best solutions below

3
sakir On

Take alook at here

uploadify error handling

'onUploadError' : function(file, errorCode, errorMsg, errorString) { alert('The file ' + file.name + ' could not be uploaded: ' + errorString); }