Unhandled exception

Nov 5, 2009 at 10:47 PM

In FileUpload.cs there is an unhandled exception that I am now seeing. BTW, I did not see this until I upgraded from IE7 to IE8.
In IE7 the problem would manifest by occasionally a file not being uploaded and the progress bar would not move.
I would just stop the upload and try again, but now it gives an exception when the server eventually responds with a "Not found" message code 4004

I tried catching it using this in the method; private void ReadCallback(IAsyncResult asynchronousResult):
try
{
response = (HttpWebResponse)webrequest.EndGetResponse(asynchronousResult);
}
catch (Exception ex) //also tried catch (WebException)
{

if (resizeStream != null)
resizeStream.Close();
Helper.dispMessage("Network error: " + ex.ToString());
}

but it doesn't catch it, and the debugger display the offending line.
BTW, I am using the PHP server side code.

Thanks
Tom

Nov 7, 2009 at 2:08 PM

Update:

I commented out the line:

response = (HttpWebResponse)webrequest.EndGetResponse(asynchronousResult);

plus a few other associated lines and at least now it doesn't crash.

It uploads the files correctly and still occasionally does not upload a file like it did with IE7.

It would be nice to know wht the files don't get uploaded occasionally.

 

Tom