H
hb
I am having trouble with creating a document server from a database using
asp.net.
It works on the development machine (win2k, iis5.0), but fails on the
production server (win2003, iis6.0).
The production server is not failing in all circumstances, however. The
behavior has the following characteristics:
1) serving of gif and jpg files work fine on both machines
2) serving of pdf files works on:
a) the development server through http - always (client on dev server or
another machine)
b) the production server when sent via http
c) the production server through https when the client is also run on
the production server
and fails on:
a) the production server when sent via https
In the failing cases, the client gets a dialog box with the following
message:
Acrobat could not open 'xxx.fdf' because it is either
not a supported file type or because the file has been
corrupted (for example it was sent as an e-mail
attachment and wasn't properly decoded).
I find it strange that pdf says 'xxx.fdf' rather than 'xxx.pdf'. That is
not a typo. It is not an error in the document server either since the code
is the same when it works and when it doesn't work.
After reading some of the comments on the forum, from people with similar
questions, I tried increasing the expiration from "immediate" to 5 minutes.
I've also increased the page timeout setting to 90 seconds though this
document is small enough to be sent in well under 10 seconds.
The pertinent code is as follows:
Response.Clear();
Response.ContentType = "application/pdf"; // note this
is image/gif or image/jpg for the other formats
Response.AppendHeader("Content-Length", ""+docSize);
Response.AppendHeader("Content-Disposition", "inline;
filename="+docName); // note, tried it with/without "inline; " inculded
it didn't have an observable effect.
Response.BinaryWrite(doc);
Response.End();
All suggestions welcome.
hb
asp.net.
It works on the development machine (win2k, iis5.0), but fails on the
production server (win2003, iis6.0).
The production server is not failing in all circumstances, however. The
behavior has the following characteristics:
1) serving of gif and jpg files work fine on both machines
2) serving of pdf files works on:
a) the development server through http - always (client on dev server or
another machine)
b) the production server when sent via http
c) the production server through https when the client is also run on
the production server
and fails on:
a) the production server when sent via https
In the failing cases, the client gets a dialog box with the following
message:
Acrobat could not open 'xxx.fdf' because it is either
not a supported file type or because the file has been
corrupted (for example it was sent as an e-mail
attachment and wasn't properly decoded).
I find it strange that pdf says 'xxx.fdf' rather than 'xxx.pdf'. That is
not a typo. It is not an error in the document server either since the code
is the same when it works and when it doesn't work.
After reading some of the comments on the forum, from people with similar
questions, I tried increasing the expiration from "immediate" to 5 minutes.
I've also increased the page timeout setting to 90 seconds though this
document is small enough to be sent in well under 10 seconds.
The pertinent code is as follows:
Response.Clear();
Response.ContentType = "application/pdf"; // note this
is image/gif or image/jpg for the other formats
Response.AppendHeader("Content-Length", ""+docSize);
Response.AppendHeader("Content-Disposition", "inline;
filename="+docName); // note, tried it with/without "inline; " inculded
it didn't have an observable effect.
Response.BinaryWrite(doc);
Response.End();
All suggestions welcome.
hb