Keep Sites Running Smoothly By Avoiding These 10 Common ASP. In this article I will try to explain you the technique of displaying file in the browser using Byte Array through HTTPS. Reason behind writing this article is, I need to implement this functionality in my application I invested lots of hours behind this and finally I found the solution. I have a popup window in which to create read stream from buffer pdf a PDF file.

This PDF is coming from Web Service call, which returns us a Byte Array. All ok so far, byte array is populated. This page contains both secure and nonsecure items. Do you want to display the nonsecure items? Clicking either Yes or No continued to display the document as normal, but there seemed no solution to getting rid of the dialog box. If you do a Google on this text, you’ll only get back about four pages and one Groups post. The second post leads you to the solution.

Notice that the code above includes the length of the byte array being written to the output stream? I did, so I believed that ASP. Net would correctly populate the HTTP Headers indicating the length of the output. Unfortunately, this was a bad assumption. HTTP header when HTTPS is used.

Microsoft even acknowledges that there may be a bug in IE6. This fix worked like a dream. Thanks for your analysis and clear instructions! It works and helps a lot!