IIS enabled Gzip compression caused OpenFlashChart not to display problems and solutions.

  

When using OpenFlashChart control to display charts in .NET, who would have thought that the display of the chart is normal or not, and whether the server IIS is enabled with Gzip compression?

Two sites use the same program, one site OpenFlashChart chart can display normally, another site shows "ioerror Error #2032", and this problem only appears in IE6 browser, Firefox and IE7 Can be displayed normally, what is the cause?

search on the Web, the only reason is to be found on the server using Gzip compression for optimizing Web and no-cache, the solution is caused by the simultaneous increase in the HTTP header of the page in return, The sample code is as follows:

Response.Clear();
//Response.CacheControl = "no-cache";
//Use this sentence instead of the above sentence
Response.AppendHeader(" Cache-Control", "no-cache, no-store, must-revalidate, max-age=-1");
Response.Write(chart.ToString()); //output openflashchat stream
Response .End();

After the modification, the OpenFlashChart chart is finally displayed normally in IE6.

Copyright © Windows knowledge All Rights Reserved