Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now