473,320 Members | 1,820 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,320 software developers and data experts.

Strange error with Response.WriteFile and SSL

I have a site running under SSL. Works well so far but there is one ASPX
page which returns a dynamically created PDF file using Response.WriteFile.

When the browser requests this ASPX page via https (SSL) it displays a
message that secure and non secure items are to be displayed (free
translation from german so it might not be the exact wording in english).
When I say no (means non secure items are not displayed) my PDF still is
displayed - so it seems thats not the one causing the message.

Any ideas whats wrong or even better how to solve it?

Regards,
Martin Knopp
fecher GmbH
Nov 18 '05 #1
6 3505
"Martin Knopp" <ma**********@fecher.at> wrote in news:GGVQb.304173$Tz1.135851
@news.chello.at:
I have a site running under SSL. Works well so far but there is one ASPX
page which returns a dynamically created PDF file using Response.WriteFile.

When the browser requests this ASPX page via https (SSL) it displays a
message that secure and non secure items are to be displayed (free
translation from german so it might not be the exact wording in english).
When I say no (means non secure items are not displayed) my PDF still is
displayed - so it seems thats not the one causing the message.

Any ideas whats wrong or even better how to solve it?


It means that somewhere in the content you are sending back are some http://
referendces instead of https:// references. You need to make all images, and
other external type links https://
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 18 '05 #2
That would have been easy!

I checked for this already and the only thing we return is a PDF document.
Nothing else.

Today I heard from some source that it might be a problem of IE. I will have
to further investigate this probably.

Any other ideas/hints?

--
Martin Knopp
fecher GmbH
"Chad Z. Hower aka Kudzu" <cp**@hower.org> schrieb im Newsbeitrag
news:Xn*****************@127.0.0.1...
"Martin Knopp" <ma**********@fecher.at> wrote in news:GGVQb.304173$Tz1.135851 @news.chello.at:
I have a site running under SSL. Works well so far but there is one ASPX
page which returns a dynamically created PDF file using Response.WriteFile.
When the browser requests this ASPX page via https (SSL) it displays a
message that secure and non secure items are to be displayed (free
translation from german so it might not be the exact wording in english). When I say no (means non secure items are not displayed) my PDF still is
displayed - so it seems thats not the one causing the message.

Any ideas whats wrong or even better how to solve it?
It means that somewhere in the content you are sending back are some

http:// referendces instead of https:// references. You need to make all images, and other external type links https://
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 18 '05 #3
"Martin Knopp" <ma**********@fecher.at> wrote in
news:Lm*********************@news.chello.at:
I checked for this already and the only thing we return is a PDF
document. Nothing else.


Does the PDF have any links in it? IE shouldnt see those but..

Do a view source on the HTML and search for http://
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"
ELKNews - Get your free copy at http://www.atozedsoftware.com

Nov 18 '05 #4
How do you display a PDF?
Do you return the PDF document with proper content type?
Or are you displaying the HTML with embeded PDF?

George.

"Martin Knopp" <ma**********@fecher.at> wrote in message
news:GG*********************@news.chello.at...
I have a site running under SSL. Works well so far but there is one ASPX
page which returns a dynamically created PDF file using Response.WriteFile.
When the browser requests this ASPX page via https (SSL) it displays a
message that secure and non secure items are to be displayed (free
translation from german so it might not be the exact wording in english).
When I say no (means non secure items are not displayed) my PDF still is
displayed - so it seems thats not the one causing the message.

Any ideas whats wrong or even better how to solve it?

Regards,
Martin Knopp
fecher GmbH

Nov 18 '05 #5
I return the PDF with proper contenttype

code-behind in Page_Load event (C#) looks approximately like this:

Response.Clear();
Response.ContentType = "appilcation/pdf";
Response.WriteFile( <local path to PDF document> );
Response.End();

Regards,
Martin Knopp
fecher GmbH
http://www.fecher.at

"George Ter-Saakov" <no****@hotmail.com> schrieb im Newsbeitrag
news:Oe**************@TK2MSFTNGP11.phx.gbl...
How do you display a PDF?
Do you return the PDF document with proper content type?
Or are you displaying the HTML with embeded PDF?

George.

"Martin Knopp" <ma**********@fecher.at> wrote in message
news:GG*********************@news.chello.at...
I have a site running under SSL. Works well so far but there is one ASPX
page which returns a dynamically created PDF file using

Response.WriteFile.

When the browser requests this ASPX page via https (SSL) it displays a
message that secure and non secure items are to be displayed (free
translation from german so it might not be the exact wording in english). When I say no (means non secure items are not displayed) my PDF still is
displayed - so it seems thats not the one causing the message.

Any ideas whats wrong or even better how to solve it?

Regards,
Martin Knopp
fecher GmbH


Nov 18 '05 #6
go to aspx page you are using for downloads and check to see if in html view
you see any html / aspx elements (if yes remove them)
because when you call Response.Flush they will not be cleared unless you
have default Buffer = true applicable across

a better option for downloads is to use ashx... it httphandler you... they
do offer a performance boost of around 5 - 10%

--
Regards,
HD
Once a Geek.... Always a Geek
"Martin Knopp" <ma**********@fecher.at> wrote in message
news:ti********************@news.chello.at...
I return the PDF with proper contenttype

code-behind in Page_Load event (C#) looks approximately like this:

Response.Clear();
Response.ContentType = "appilcation/pdf";
Response.WriteFile( <local path to PDF document> );
Response.End();

Regards,
Martin Knopp
fecher GmbH
http://www.fecher.at

"George Ter-Saakov" <no****@hotmail.com> schrieb im Newsbeitrag
news:Oe**************@TK2MSFTNGP11.phx.gbl...
How do you display a PDF?
Do you return the PDF document with proper content type?
Or are you displaying the HTML with embeded PDF?

George.

"Martin Knopp" <ma**********@fecher.at> wrote in message
news:GG*********************@news.chello.at...
> I have a site running under SSL. Works well so far but there is one
> ASPX
> page which returns a dynamically created PDF file using

Response.WriteFile.
>
> When the browser requests this ASPX page via https (SSL) it displays a
> message that secure and non secure items are to be displayed (free
> translation from german so it might not be the exact wording in english). > When I say no (means non secure items are not displayed) my PDF still
> is
> displayed - so it seems thats not the one causing the message.
>
> Any ideas whats wrong or even better how to solve it?
>
> Regards,
> Martin Knopp
> fecher GmbH
>
>



Nov 18 '05 #7

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

Similar topics

17
by: SW1 | last post by:
I wrote a small program which does something like tftp - transfering files and some chat, anyway i got a problem with fwrite, here is a snippet of my code: while(length > 0) { putchar('.');...
0
by: Markus Nilsson | last post by:
This code: --code start-- private void WriteFile() { StreamWriter sw = new StreamWriter(File.Create("test.txt")); sw.Write("test"); sw.Close();
14
by: James Wong | last post by:
Hi! everybody, I'm facing a quite strange download problem. I use the following code to download an XML file to client side: With Response ' clear buffer Call .Clear() ' specify the...
2
by: Carter | last post by:
i have a treeview on a webform (.aspx). when the user selects an appropriate node on the tvw. and clicks on a link button, i'm downloading a corresponding file to the client (from the server). so far...
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...
3
by: Jocelyn Duhaylungsod | last post by:
I have been getting the following server errors sporadically while downloading excel, csv or xml file. Internet Explorer cannot download <file name> from <IP address> "The server returned an...
8
by: Scott C. Reynolds | last post by:
I want to serve a PDF right to a web page (cannot link browser directly to PDF file). Stumbled across Response.WriteFile this morning. On my machine (XP Pro) this worked fine: private void...
3
by: MatsL | last post by:
Hi, I'm having a problem sending a file using TransmitFile(). The code works perfectly using WriteFile() so I'm a little confused. Does TransmitFile() have any other prerequisites than...
3
by: MJP | last post by:
I have a button which kicks off the generation of a report after which the file will be downloaded. The report generation can take a long time, so client side onclick event of the button also...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.