Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > SSL Response.WriteBinary()

Reply
Thread Tools

SSL Response.WriteBinary()

 
 
Adam B
Guest
Posts: n/a
 
      12-04-2003
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Failed set trust point in ssl context" when using SSL communication emukang Java 0 12-20-2005 04:54 PM
Response.Redirect from SSL to non SSL with port drops port. Sean Wolfe ASP .Net 1 04-28-2005 07:49 PM
SSL with backend SSL on CSS 11500 Olivier PELERIN Cisco 0 08-30-2004 08:30 PM
How to imbed non-SSL links within SSL pages without using code CW ASP .Net 2 05-02-2004 01:40 PM
From non-ssl area to ssl ara with a virtual href path? 620 ASP .Net 2 01-06-2004 09:58 PM



Advertisments