Can't open PDF with Adobe Acrobat Reader DC with a webapplication
Hi,
i am trying to open a pdf file from my webapplication (asp.net) and i get following message after a while.

The pdf doesn't open. After that i can't open Adobe Acrobat Reader DC directly. Or i can' open any pdf directly with the Reader.
And in the Taskmanager you will see it opens many processes of Adobe

is there an other (better) way as the below code to open a pdf file?
public class Download : IHttpHandler, System.Web.SessionState.IRequiresSessionState
{
public void ProcessRequest(HttpContext context)
{
try
{
string filename = "DEV-H211.pdf";
string documentDirectory = @"D:\";
if (File.Exists(string.Format("{0}\\{1}", documentDirectory, filename)))
{
context.Response.ContentType = "application/pdf";
context.Response.AddHeader("content-disposition", string.Format("attachment; filename={0}", filename));
context.Response.TransmitFile(string.Format("{0}\\{1}", documentDirectory, filename));
context.Response.Flush();
}
}
catch(Exception ex)
{
Console.WriteLine(ex.Message);
}
}
public bool IsReusable
{
get
{
return false;
}
}
}
