Click here to Skip to main content
15,899,025 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear All

I am writing code for download image file.
C#
Response.AppendHeader();
Response.ContentType=type;
Respone.WriteFile(file);
Response.End();

This is working for .gif,.jpeg,.png but it is giving problem for 'tiff'. I have try ContentType "image/tif" &"image/tiff" but it is giving error Headers
'Page.Response.Headers' threw an exception of type System.PlatformNotSupportedException'	System.Collections.Specialized.NameValueCollection {System.PlatformNotSupportedException}.

I have also tried for changing app pool to integrated but still it is not working.
I am using Classic 2.0 app pool & iis 7.0.
I have got temporary solution. As I remove update panel it works fine.
Can u tell me why this is happening?

Thanks
Posted
Updated 2-May-12 21:57pm
v4

 
Share this answer
 
Solution1.
No need to remove update panel only you will have to apply as PostBackTrigger for that control.
Solution2.
change application pool as from classic to integrated.
 
Share this answer
 
v2

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