8
Reply

URI formats are not supported

PankaJ D

PankaJ D

Mar 4 2011 8:00 AM
28.3k


I am trying to open pdf file using folowing code.

 if (extension == ".pdf")
            {

                 context.Response.AddHeader("Content-Type", "application/pdf");
  FileStream fs = new FileStream(path, FileMode.Open);
            }

but it throws an exception "URI formats are not supported"
I have checked path,path is correct & file also availabe.


Answers (8)