My application is a web application. This error is thrown my Microsoft excel.I have attached the snap shot of the error. The page viewerContent.aspx is the page which calls a class that saves the complete workbook into a stream -
//load the complete workbook to the stream
Then renders it using the following code -
obj = ms.ToArray();
this.Context.Response.ContentType = "application/vnd.ms-excel";
this.Context.Response.AddHeader("content-disposition", "inline; filename=" + ReportName + ".xls");
this.Context.Response.OutputStream.Write(obj, 0, obj.Length);
Could you please tell me Y this happens and what I must do? However, when I click ok on this warning message the excel actually opens.