Saturday, March 24, 2012
Strange error with Response.WriteFile and SSL
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"Martin Knopp" <martin.knopp@.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
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" <cpub@.hower.org> schrieb im Newsbeitrag
news:Xns947C29C3EBBCcpub@.127.0.0.1...
> "Martin Knopp" <martin.knopp@.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
"Martin Knopp" <martin.knopp@.fecher.at> wrote in
news:Lm7Rb.314459$Tz1.163161@.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
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" <martin.knopp@.fecher.at> wrote in message
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?
> Regards,
> Martin Knopp
> fecher GmbH
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" <nospam@.hotmail.com> schrieb im Newsbeitrag
news:OeFFEoC5DHA.2540@.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" <martin.knopp@.fecher.at> wrote in message
> 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?
> > Regards,
> > Martin Knopp
> > fecher GmbH
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" <martin.knopp@.fecher.at> wrote in message
news:tisRb.330066$Tz1.68379@.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" <nospam@.hotmail.com> schrieb im Newsbeitrag
> news:OeFFEoC5DHA.2540@.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" <martin.knopp@.fecher.at> wrote in message
>> 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?
>>> > Regards,
>> > Martin Knopp
>> > fecher GmbH
>>>>
>>
Thursday, March 22, 2012
strange file upload behaviour (404 with one pdf but not with another)
Maybe there is an oracle out there who can help.
I have an aspx site and a simple fileupload control on it.
Everything works fine except:
I can reproduce an 404 error when trying to upload some files.
It only happens when trying to upload PDF Files, and not on every PDF
File.
Let me illustrate this
xy.pdf - upload no problem
ab.pdf - 404 - Cannot find server or DNS Error
There are more pdf's where the problem occurs and also some others
where it does not..
The error comes within a millisecond as if IE does not try to upload.
What the heck is this...?i bet you the one that doesn't work is over 4 megs right?
mikecom@.gmx.net wrote:
> Hi
> Maybe there is an oracle out there who can help.
> I have an aspx site and a simple fileupload control on it.
> Everything works fine except:
> I can reproduce an 404 error when trying to upload some files.
> It only happens when trying to upload PDF Files, and not on every PDF
> File.
> Let me illustrate this
> xy.pdf - upload no problem
> ab.pdf - 404 - Cannot find server or DNS Error
> There are more pdf's where the problem occurs and also some others
> where it does not..
> The error comes within a millisecond as if IE does not try to upload.
> What the heck is this...?
max upload size in asp.net is 4 MB
you can change this in web.config:
<httpRuntime maxRequestLength="size in kbytes" /
asp.net uploads files into memory, so a 1 GB upload will take 1 GB of
memory on your server. if you want to upload big files, you'll need to
buy an upload component that streams uploaded files to disk.
mikecom@.gmx.net wrote:
> Hi
> Maybe there is an oracle out there who can help.
> I have an aspx site and a simple fileupload control on it.
> Everything works fine except:
> I can reproduce an 404 error when trying to upload some files.
> It only happens when trying to upload PDF Files, and not on every PDF
> File.
> Let me illustrate this
> xy.pdf - upload no problem
> ab.pdf - 404 - Cannot find server or DNS Error
> There are more pdf's where the problem occurs and also some others
> where it does not..
> The error comes within a millisecond as if IE does not try to upload.
> What the heck is this...?
Bet won!
That was the problem...
Tanks a lot!
neilmcguigan@.gmail.com wrote:
> max upload size in asp.net is 4 MB
> you can change this in web.config:
> <httpRuntime maxRequestLength="size in kbytes" />
> asp.net uploads files into memory, so a 1 GB upload will take 1 GB of
> memory on your server. if you want to upload big files, you'll need to
> buy an upload component that streams uploaded files to disk.
> mikecom@.gmx.net wrote:
> > Hi
> > Maybe there is an oracle out there who can help.
> > I have an aspx site and a simple fileupload control on it.
> > Everything works fine except:
> > I can reproduce an 404 error when trying to upload some files.
> > It only happens when trying to upload PDF Files, and not on every PDF
> > File.
> > Let me illustrate this
> > xy.pdf - upload no problem
> > ab.pdf - 404 - Cannot find server or DNS Error
> > There are more pdf's where the problem occurs and also some others
> > where it does not..
> > The error comes within a millisecond as if IE does not try to upload.
> > What the heck is this...?
strange file upload behaviour (404 with one pdf but not with another)
Maybe there is an oracle out there who can help.
I have an aspx site and a simple fileupload control on it.
Everything works fine except:
I can reproduce an 404 error when trying to upload some files.
It only happens when trying to upload PDF Files, and not on every PDF
File.
Let me illustrate this
xy.pdf - upload no problem
ab.pdf - 404 - Cannot find server or DNS Error
There are more pdf's where the problem occurs and also some others
where it does not..
The error comes within a millisecond as if IE does not try to upload.
What the heck is this...?i bet you the one that doesn't work is over 4 megs right?
mikecom@.gmx.net wrote:
> Hi
> Maybe there is an oracle out there who can help.
> I have an aspx site and a simple fileupload control on it.
> Everything works fine except:
> I can reproduce an 404 error when trying to upload some files.
> It only happens when trying to upload PDF Files, and not on every PDF
> File.
> Let me illustrate this
> xy.pdf - upload no problem
> ab.pdf - 404 - Cannot find server or DNS Error
> There are more pdf's where the problem occurs and also some others
> where it does not..
> The error comes within a millisecond as if IE does not try to upload.
> What the heck is this...?
max upload size in asp.net is 4 MB
you can change this in web.config:
<httpRuntime maxRequestLength="size in kbytes" />
asp.net uploads files into memory, so a 1 GB upload will take 1 GB of
memory on your server. if you want to upload big files, you'll need to
buy an upload component that streams uploaded files to disk.
mikecom@.gmx.net wrote:
> Hi
> Maybe there is an oracle out there who can help.
> I have an aspx site and a simple fileupload control on it.
> Everything works fine except:
> I can reproduce an 404 error when trying to upload some files.
> It only happens when trying to upload PDF Files, and not on every PDF
> File.
> Let me illustrate this
> xy.pdf - upload no problem
> ab.pdf - 404 - Cannot find server or DNS Error
> There are more pdf's where the problem occurs and also some others
> where it does not..
> The error comes within a millisecond as if IE does not try to upload.
> What the heck is this...?
Bet won!
That was the problem...
Tanks a lot!
neilmcguigan@.gmail.com wrote:
> max upload size in asp.net is 4 MB
> you can change this in web.config:
> <httpRuntime maxRequestLength="size in kbytes" />
> asp.net uploads files into memory, so a 1 GB upload will take 1 GB of
> memory on your server. if you want to upload big files, you'll need to
> buy an upload component that streams uploaded files to disk.
> mikecom@.gmx.net wrote: