How do I prevent the network/server from resetting? The sample site is running under the visual studio webserver.
After further testing the error happens in IE and FF. I've been debugging the Sample #2 MVC C# Demo site using visual studio and IE8. Everytime the ProcessRequest function finishes in the UploadHandler.ashx, I get an alert box on IE error code I posted earlier.
Here's the code:
- public void ProcessRequest (HttpContext context) {
- using (CuteWebUI.MvcUploader uploader = new CuteWebUI.MvcUploader(context))
- {
- uploader.UploadUrl = context.Response.ApplyAppPathModifier("~/UploadHandler.ashx");
-
- uploader.FormName = "myuploader";
- uploader.AllowedFileExtensions = "*.jpg,*.gif,*.png,*.bmp,*.zip,*.rar";
-
-
- uploader.PreProcessRequest();
-
-
- if (uploader.IsValidationRequest)
- {
-
- MvcUploadFile file = uploader.GetValidatingFile();
-
- if (string.Equals(Path.GetExtension(file.FileName), ".bmp", StringComparison.OrdinalIgnoreCase))
- {
- uploader.WriteValidationError("My custom validation error : do not upload bmp");
- return;
- }
-
- uploader.WriteValidationOK();
- return;
- }
- }
- }