I've been working on a small page that allows my users to publish and
retrieve documents from a SQL database. Everything appears to be
working fine with exception of 2 things.
1.) Any file that can be opened and edited with the NotePad, once the
file has been uploaded to the SQL Server, when it's retrieved it has
the HTML for the web page I'm retrieving the file with. Below is an
example of a text file that I uploaded.
File Content Example:
This lline was entered in the *.txt file before uploading. Everything
below this was added when retrieving from SQL.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
2.) Office 2007 format documents retrieve as being corrupt.
Is Response.WriteBinary the proper way to do this...and if so, can you
give me some insite as to where I might be able to fix this problem?
Any help would be greatly appreciated.
On Mon, 27 Oct 2008 13:39:25 +0100, Dave <(E-Mail Removed)> wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
From where are you making the call to the HttpResponse.WriteBinary method?
If you make the call from the code-behind of an ASPX-page (so it seems),
you might need to place the call between a Response.Clear() and a
Response.End(), to be sure that no markup is added to your output.