[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 578
  • Last Modified:

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

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
qfren
Asked:
qfren
  • 2
  • 2
1 Solution
 
bennyshohamCommented:
use  Response.Clear(); before starting to write the response.
0
 
qfrenAuthor Commented:
hi,

Thanks for reply.
i did it in exisiting code.
0
 
bennyshohamCommented:
Please attach existing code so i can see what is missing.
0
 
qfrenAuthor Commented:
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

[Webinar] Improve your customer journey

A positive customer journey is important in attracting and retaining business. To improve this experience, you can use Google Maps APIs to increase checkout conversions, boost user engagement, and optimize order fulfillment. Learn how in this webinar presented by Dito.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now