IE not opening word document in client systems

asp.net Pakistan
  • 12 years ago

    Hi All,

    How are you doing today?

    I am opening word document in asp.net by using this below code

                          HttpContext.Current.Response.AddHeader("Accept-Header", fileData.Length.ToString());
                            HttpContext.Current.Response.ContentType = "application/msword";
                            HttpContext.Current.Response.OutputStream.Write(fileData, 0, fileData.Length);
                            HttpContext.Current.Response.Flush();
                            //HttpContext.Current.Response.End();
                            HttpContext.Current.Response.SuppressContent = false;
                            HttpContext.Current.Response.Close();

    Problem: Its opening word document in some systems its not opening word document some other systems. I am opening word document in asp.net popup window.I am not getting any error message.without opening word document the popup window closing.

    I checked IE settings of  both working and not working system.IE setting are same in both systems

    Please let me know do you know any solution to my problem

     

    Have a good day

    Thanks

    Sekhar 


     

     

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Beware of bugs in the above code; I have only proved it correct, not tried it.” - Donald Knuth