The following line of code can be used to return the physical PDF (and not one from my handler):
context.Response.Clear();It will also 404 if the PDF does not exist on the path.
context.Response.ContentType = "application/pdf";
context.Response.TransmitFile(context.Request.PhysicalPath);
context.Response.Flush();
context.Response.Close();
No comments:
Post a Comment