locked
While generating .docx using response.header , we are facing "File Corrupt Issue" RRS feed

  • Question

  • We have used the below lines of code. 

    Response.ContentType = "application/vnd.openxmlformats-officedocuments.wordprocessingml.document"

    Response.AddHeader("Content-Disposition", "attachment; filename = Document.docx")

    Response.BinaryWrite(doc)

    Response.Flush()

    Response.End()

     

    We are getting File corrupted issue when opened in Word  2010.

    Friday, September 27, 2013 3:59 PM

Answers

  • Hi,

    For issue, we’d recommend you ask Word for Developers forum for professional solution:

    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Karen Hu
    TechNet Community Support

    • Marked as answer by Karen Hu Tuesday, October 1, 2013 5:59 AM
    Monday, September 30, 2013 3:07 AM

All replies

  • Hi,

    For issue, we’d recommend you ask Word for Developers forum for professional solution:

    http://social.msdn.microsoft.com/Forums/office/en-US/home?forum=worddev

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.


    Karen Hu
    TechNet Community Support

    • Marked as answer by Karen Hu Tuesday, October 1, 2013 5:59 AM
    Monday, September 30, 2013 3:07 AM
  • Thank You Karen Hu for redirecting to the appropriate forum.

    I have posted my question in msdn worddevorum.

    Monday, September 30, 2013 7:27 AM