Solved

Response.ContentType : reading file from database (binary) will append html code !

Posted on 2007-03-21
6
573 Views
Last Modified: 2008-01-09
hi experts:
I m using MS 2005 with .net 2.0

my app save  file into database table in binary type, and then i will retrieve it to open and view it.
Everytime work ok. But  i found that now if i open from database a text file (.txt) from my own machine localhost then nothing wrong with the content, but when i deploy to another server and access the same app (on that server ) and open the file again,the content of the text file will append the html code of current page below the orignal contents!!

pls help...


0
Comment
Question by:qfren
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
6 Comments
 
LVL 1

Expert Comment

by:bennyshoham
ID: 18770466
use  Response.Clear(); before starting to write the response.
0
 
LVL 8

Author Comment

by:qfren
ID: 18777866
hi,

Thanks for reply.
i did it in exisiting code.
0
 
LVL 1

Expert Comment

by:bennyshoham
ID: 18778235
Please attach existing code so i can see what is missing.
0
 
LVL 8

Accepted Solution

by:
qfren earned 0 total points
ID: 18791398
hi,
I find out what is the cause already.
i append  Response.End()  after response object into my existing code and it solve the problems!
Anyway , thanks for your comment!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Data Analysis 7 59
SSIS Column mapping 5 42
Left aligned $ and right aligned amount ASP.NET 7 46
Convert a string to date 4 40
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question