I have a PDF file and you want to open it on the clients desktop (so I don’t know the default directory of my PDF reader) ...
... File.WriteAllBytes(pdfByteArray, path); File.Open(path, FileMode.Open); ...
doesn't seem to work here ...
Try opening it as follows:
File.WriteAllBytes(pdfByteArray, path); Process.Start(path);
If it pathends with some extension (for example .PDF) that has a program associated with it, it will be opened using this program.
path