I am using Response to have my application open up a Word Document for the user. If the user chooses to save the file, it saves it and the file looks how it should when you open it. If the user chooses to open the file right away, they receive an error saying that IE couldn't open the file. If they choose 'Retry', MS Word shows an error saying it cannot find the file. Below are screen shots showing my situation. Also, here is the code I have to display the file:

        this.Context.Response.Clear();
        this.Context.Response.ClearContent();
        this.Context.Response.ClearHeaders();
        this.Context.Response.BufferOutput = true;
        this.Context.Response.ContentType = "application/msword";
        this.Context.Response.AppendHeader("Content-Length", bytes.Length.ToString()); 
        this.Context.Response.AddHeader("Content-Disposition", "attachment; filename=" + "Test Document.doc");
        this.Context.Response.BinaryWrite(bytes);
        this.Context.ApplicationInstance.CompleteRequest();

Here is the screen when prompting the user of the download: enter image description here

Here is the screen after user chooses 'Open' enter image description here

Here is the screen after user chooses 'Retry'. This screen is coming for MS Word. enter image description here

****EDIT**** I have found a bit of code online that I tried testing and issue still occures when I call this function:

    protected void GenerateMsWordDoc()
    {
        string strBody = "<html>" +
            "<body>" + 
                "<div>Your name is: <b>Billy Bob</b></div>" +
                "<table width='100%' style='background-color:#cfcfcf;'><tr><td>1st Cell body data</td><td>2nd cell bo
Edit
Report