Error when overring ContentType

2 posts, 0 answers
  1. Michael
    Michael avatar
    84 posts
    Member since:
    May 2008

    Posted 25 Jul 2009 Link to this post


    I am generating a CSV file on the fly in my aspx page. RadCompression is giving me an error when processing is done and it is about to send a "application/octet-stream" content type to my page.

    Here's my code.

                    string strFileContent = sb.ToString(); // This is the CSV string generated 
                    // EXPORT 
                    string strFile = "export.csv"
                    string ContentType = "application/octet-stream"
                    Response.ContentType = ContentType; 
                    Response.AddHeader("Content-Disposition""attachment; filename=\"" + strFile + "\""); 

    I had to remove RadCompresstion from the web.config to get this working. Thanks.
  2. Rosen
    Rosen avatar
    3247 posts

    Posted 27 Jul 2009 Link to this post

    Hello Michael,

    Can you please specify the exact error you are getting? Are you by any chance have enabled the compression for full page postbacks? If this is the case you may disable it and see if this makes any difference. 

    All the best,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Back to Top