Last post Sep 15, 2006 10:44 AM by FHeNuS
Sep 15, 2006 10:44 AM|FHeNuS|LINK
Hello guys, first i would like to thank all posts of File Upload here on the forums, with them i could develop a working HttpHandler used to upload files by blocks for ASP.NET 2.0. The only thing i still want to change its this:
When occurs an exception (File Size Exceeded, Invalid Extension, Invalid MimeType) or when the user cancels the upload i want to stop processing the request. Until now i coudn´t get this working. When an exception occurs the handler attempts to finish the
request, but then continues again. It seems that the client doen´s expects the request to finish because still has data to send.
The user has posted a file with the size of 2mb. Lets says that after processing 1mb occurs an error. Because the client still has 1mb to send to the server, it ignores the end of the request.
My question its this: Is there a mean to stop processing the request when reading the content using HttpWorkerRequest, sinalizes the client that has ended, even if it needs to read more data from the client? I don´t care if im not able to throw the exception,
but i wan´t to stop the proccess. If possible i don´t want to use Response.Redirect...