Solved

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

Posted on 2007-03-21
6
572 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project

749 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