Click here to Skip to main content
15,887,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

We are facing a strange problem in our project. We have used a "Response. BinaryRead" and "Response. BinaryWrite" methods to render a document which is there in virtual folder in our project.

While passing to Binary read and write we have done a map path which is working fine in development as well as in test.

But in production the document is rendering as the page name itself and opening in HTML format.

What could be the problem. Give any clue.


Thanks
Posted
Comments
ZurdoDev 7-Mar-12 8:02am    
Have you verified proper permissions for the App Pool account to the folder you are trying to read?

1 solution

1. 1st of all you need to ensure that the content type is set correctly.
2. If it is asp.net, do the download on page_load event instead of any button click or something like that. I faced similar problem. But the problem was there only for IE. It was ok on other browsers. taking the code to Page_Load solved it for me.
3. Spacial character in file name may also create problem


Please rate the answer if it helps.
Thanks
Mahmud
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900