Jan 31, 2014, 5:53 AM
FileUpload Issue
Hi
I have a problem when uploading a file which is too large.
I have an Ext.FileUpload control placed on the form. After the selection is made a DirectMethod is automatically fired to upload the file. The method is never run and the Application_Error event is fired in the Global.asax where I have generic error handling taking place.
void Application_Error(object sender, EventArgs e)
{
Exception exception = HttpContext.Current.Error;
Server.ClearError();
StringBuilder sb = new StringBuilder();
sb.AppendFormat("********** {0} **********", DateTime.Now);
var data = GetErrorData(exception);
if (data.Length > 0)
{
sb.AppendLine("Method Paramater List" + data);
sb.AppendLine();
sb.AppendLine();
}
sb.AppendLine(exception.ToString());
ResourceManager.AjaxSuccess = false;
ResourceManager.AjaxErrorMessage = sb.ToString();
}
The first thing is, is that the Application_Error is fired twice?? Secondly my generic javascript handler is never fired when catching errors? So an error is never returned.The js error function is one of this forum eg.
<ext:ResourceManager runat="server">
<Listeners>
<AjaxRequestException Fn="handleError" />
</Listeners>
</ext:ResourceManager>
function handleError(response, result, el, eventType, action, extraParams, o) {
// display error in window
}
How do I catch this error?