So, I have an issue where I need to check why we can't open PDF files using google chrome, I tried Brave, IE, Edge, Firefox on latest updates and is working perfectly, but after the latest update as of today we cannot view the preview, the button print is available but then we cant print.
Also tried Chrome Beta (Version 99.0.4844.51 (Official Build) beta (64-bit)) And Canary (Version 101.0.4919.0 (Official Build) canary (64-bit)) and they have the same issue.
This is a aspx, which the code behind we get the pdf as EncodeString64 we then convert it Convert.FromBase64String(pdfContent)
(We get the bytes) we send the response (HttpResponse) with Buffer
and BufferOutput
to False
the ContentType = application/pdf
and we add 2 headers, the "content-length"
and "content-disposition"
, "inline; filename=" & nameOfFile & ".pdf"
,
CacheControl = "no-cache", Expires = -1, and Response.BinaryWrite(pdfContentInBytes)
and finally Response.Flush()
I don't know if anyone have encountered the same issue after this new chrome update.
Technologies: .Net Framework 4.7.2