O
Oscar
Hi,
I got a webservie that supply users with binary files based on a parameter
id. The method is void and I stream the file by:
HttpContext.Current.Response.ContentType = "application/xxx";
HttpContext.Current.Response.BinaryWrite(arrResult);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
HttpContext.Current.Response.Close();
return;
If the parameter id is invalid or if something goes wrong I would like to
throw either 404 och 500 exception. I been tring to do this with the
following code but I will allways recieve a 500. How can I control the
output exception.
I got a webservie that supply users with binary files based on a parameter
id. The method is void and I stream the file by:
HttpContext.Current.Response.ContentType = "application/xxx";
HttpContext.Current.Response.BinaryWrite(arrResult);
HttpContext.Current.Response.Flush();
HttpContext.Current.Response.End();
HttpContext.Current.Response.Close();
return;
If the parameter id is invalid or if something goes wrong I would like to
throw either 404 och 500 exception. I been tring to do this with the
following code but I will allways recieve a 500. How can I control the
output exception.