From: Barnesy on
Hello,

We have a secure website running on IIS 6 that allows external users to
download PDF files. On the website we have a button that generates a PDF file
from text displayed in the browser. When we try to generate the PDF file we
get an error 'Unable to open document'. I have tested this without SSL and
the generate PDF function works correctly so I know it is something to do
with accessing the site securely. We are using a third party tool from
winnovative software and they haven't heard of anyone else experiencing this
problem.

I have managed to fix the problem by adding the following registry keys on
my PC but we need to fix this at the server as we can't get all our external
users to add these keys

For a per-computer setting, locate the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings
"BypassSSLNoCacheCheck"=Dword:00000001
"BypassHTTPNoCacheCheck"=Dword:00000001

Many thanks

From: Dan on

"Barnesy" <Barnesy(a)discussions.microsoft.com> wrote in message
news:40AD513B-25A6-4F8F-95AA-52C8DD32CE4A(a)microsoft.com...
> Hello,
>
> We have a secure website running on IIS 6 that allows external users to
> download PDF files. On the website we have a button that generates a PDF
> file
> from text displayed in the browser. When we try to generate the PDF file
> we
> get an error 'Unable to open document'. I have tested this without SSL and
> the generate PDF function works correctly so I know it is something to do
> with accessing the site securely. We are using a third party tool from
> winnovative software and they haven't heard of anyone else experiencing
> this
> problem.
>
> I have managed to fix the problem by adding the following registry keys on
> my PC but we need to fix this at the server as we can't get all our
> external
> users to add these keys
>
> For a per-computer setting, locate the following registry key:
> HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
> Settings
> "BypassSSLNoCacheCheck"=Dword:00000001
> "BypassHTTPNoCacheCheck"=Dword:00000001
>
> Many thanks
>

This is due to browser being set to not cache content retrieved over SSL,
but the way a PDF is handled is to pass the cached content to the Adobe
plug-in or Reader, so you end up not being able to open the document because
it's never being saved in the browser cache.

See http://support.microsoft.com/kb/323308 for more details. This article
states that it should work correctly if you add the "cache-control:
no-store" header on the IIS side, and the PDF is linked to via a HREF (see
the Workaround section).

Can you provide more details on the process you are using to generate the
PDF and deliver to the browser? Are you using something like AJAX, or are
you using a form submission to submit the data to be converted?

You may need to re-engineer your application, such that the browser submits
the data, the PDF is generated and stored in a temp location on the IIS
site, and HTML is returned to the browser with an a href link to the
temporary PDF. You'll also need a cleanup routine to remove the temp files
after they've been used.

--
Dan

From: Barnesy on
Thanks. I have passed this onto our web developer and he is going to make
some code changes so the PDF is stored in a temp location and opened from
there.

"Dan" wrote:

>
> "Barnesy" <Barnesy(a)discussions.microsoft.com> wrote in message
> news:40AD513B-25A6-4F8F-95AA-52C8DD32CE4A(a)microsoft.com...
> > Hello,
> >
> > We have a secure website running on IIS 6 that allows external users to
> > download PDF files. On the website we have a button that generates a PDF
> > file
> > from text displayed in the browser. When we try to generate the PDF file
> > we
> > get an error 'Unable to open document'. I have tested this without SSL and
> > the generate PDF function works correctly so I know it is something to do
> > with accessing the site securely. We are using a third party tool from
> > winnovative software and they haven't heard of anyone else experiencing
> > this
> > problem.
> >
> > I have managed to fix the problem by adding the following registry keys on
> > my PC but we need to fix this at the server as we can't get all our
> > external
> > users to add these keys
> >
> > For a per-computer setting, locate the following registry key:
> > HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet
> > Settings
> > "BypassSSLNoCacheCheck"=Dword:00000001
> > "BypassHTTPNoCacheCheck"=Dword:00000001
> >
> > Many thanks
> >
>
> This is due to browser being set to not cache content retrieved over SSL,
> but the way a PDF is handled is to pass the cached content to the Adobe
> plug-in or Reader, so you end up not being able to open the document because
> it's never being saved in the browser cache.
>
> See http://support.microsoft.com/kb/323308 for more details. This article
> states that it should work correctly if you add the "cache-control:
> no-store" header on the IIS side, and the PDF is linked to via a HREF (see
> the Workaround section).
>
> Can you provide more details on the process you are using to generate the
> PDF and deliver to the browser? Are you using something like AJAX, or are
> you using a form submission to submit the data to be converted?
>
> You may need to re-engineer your application, such that the browser submits
> the data, the PDF is generated and stored in a temp location on the IIS
> site, and HTML is returned to the browser with an a href link to the
> temporary PDF. You'll also need a cleanup routine to remove the temp files
> after they've been used.
>
> --
> Dan
>