Page not working properly after file disposition
-
Hi, i am using a charting component to generate graphs for which data is dynamically gets bind from db In my page there is an image creation button is there, if a user clicks on that an image download dialogue will be displayed The code i am using for it is MemoryStream mstream = new MemoryStream(); try { Chart1.Save(mstream, ChartImageFormat.Png); byte[] byteArray = mstream.ToArray(); Response.AddHeader("Content-Disposition", "attachment; filename=report.png"); Response.AddHeader("Content-Length", byteArray.Length.ToString()); Response.ContentType = "image/png"; Response.BinaryWrite(byteArray); } catch { } finally { mstream.Flush(); mstream.Close(); } The image downloading works fine, but after image download if i rebind the report again from db the page is taking too long to load, some times page loads partially,some times page gives some xml error, which i will work fine if i dont click image generating button only binds the report. In my local system this works fine, but in staging server(IIS 6.0) it is giving the above problem
-
Hi, i am using a charting component to generate graphs for which data is dynamically gets bind from db In my page there is an image creation button is there, if a user clicks on that an image download dialogue will be displayed The code i am using for it is MemoryStream mstream = new MemoryStream(); try { Chart1.Save(mstream, ChartImageFormat.Png); byte[] byteArray = mstream.ToArray(); Response.AddHeader("Content-Disposition", "attachment; filename=report.png"); Response.AddHeader("Content-Length", byteArray.Length.ToString()); Response.ContentType = "image/png"; Response.BinaryWrite(byteArray); } catch { } finally { mstream.Flush(); mstream.Close(); } The image downloading works fine, but after image download if i rebind the report again from db the page is taking too long to load, some times page loads partially,some times page gives some xml error, which i will work fine if i dont click image generating button only binds the report. In my local system this works fine, but in staging server(IIS 6.0) it is giving the above problem