473,386 Members | 2,129 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

SSL Response.WriteBinary()

Hello. I'm writing an aspx page that reads a file from
disk and writes the file out through the
Response.WriteBinary() method. This allows me to support
security and custom reports for various users. I am
adding the MIME type for the type of file that I am
writing out to the response. Example:

if ( reportName.ToLower().EndsWith(".pdf"))
{

Response.ContentType="application/pdf";
Response.AddHeader( "content-
disposition","filename=StaticContentViewer.pdf");
}
if ( reportName.ToLower().EndsWith(".doc"))
{
Response.ContentType = "application/msword" ;
Response.AddHeader( "content-
disposition","filename=StaticContentViewer.doc");
}
This seems to work great on a regular non-secure site.
The problem that I am having is on a secure site (https).
I get errors in when trying to access PDF files or
MSOffice Files (doc,xls, etc) through my IE browser (IE
6). The browser just hangs on the MSOffice files and they
never open. On the PDF files, I get a warning about secure
and nonsecure info on and it will open. I know that the
pdf doesn't contain any nonsecure info, because I put the
same file on the site directly and did not receive the
error. Also, I get a javascript error when I close the
PDF.

I have looked around on many message boards and found the
following suggestion:

Response.AddHeader( "pragma","no-cache");

This did not work for me or many of the other developers
out there with the same problem.

Thanks in advance for any help or suggestions!

Adam

Nov 18 '05 #1
0 1065

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Gunther Schmidl | last post by:
Hi, I've rolled my own perl component for resizing pictures on the fly, but I have a problem with actually outputting the resized image. Here's my code: Dim res Response.Buffer = true Set...
1
by: Adam B | last post by:
Hello. I'm writing an aspx page that reads a file from disk and writes the file out through the Response.WriteBinary() method. This allows me to support security and custom reports for various...
13
by: TinyTim | last post by:
I'm a newbie at ASP & HTML. It seems that when you use server side code and you're going to return a customized HTML form with several fields and labels, you have to do an extensive amount of...
6
by: Mark | last post by:
Hi... I've come across some weird bug with Response.Cookies. Or maybe it will be called "by design" but for the life of me I can't figure out what purpose it would serve. If you're setting a...
5
by: Luiz Vianna | last post by:
Guys, I need to send some info to my client while I'm processing some stuff. The flow will be something like : -process -response -process -response .... I imagine to use response.flush...
2
by: David Union | last post by:
Hi. I'm posting this here because I don't know exactly what the best group is. This is for an aspx page with Visual Basic as the code-behind page. I am doing very simple code... in the middle...
2
by: Dave | last post by:
I've been working on a small page that allows my users to publish and retrieve documents from a SQL database. Everything appears to be working fine with exception of 2 things. 1.) Any file...
1
by: Dave | last post by:
I have a small web app that publishes files to a SQL database. I just noticed this morning that 2 conditions exist that I need help with. 1.) Any file that can be open with NotePad have the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.