K
Kevin R.
Greetings,
I have the following code that attempts to download an excel file:
System.Web.HttpContext.Current.Response.ContentType =
"application/vnd.ms-excel";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment; filename=\"x.xls\"");
System.Web.HttpContext.Current.Response.Write( "abc" );
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
But I get the following error when I executed the last statement:
"Internet Explorer was not able to open this internet site..."
I have disabled "Content Expiration" in IIS HTTP Headers and ensured
"no-cache" is not added to the Response Header.
Has anyone seen this and knows what is causing it?
Help is much appreciated,
kr
I have the following code that attempts to download an excel file:
System.Web.HttpContext.Current.Response.ContentType =
"application/vnd.ms-excel";
System.Web.HttpContext.Current.Response.AddHeader("Content-Disposition",
"attachment; filename=\"x.xls\"");
System.Web.HttpContext.Current.Response.Write( "abc" );
System.Web.HttpContext.Current.Response.Flush();
System.Web.HttpContext.Current.Response.Close();
But I get the following error when I executed the last statement:
"Internet Explorer was not able to open this internet site..."
I have disabled "Content Expiration" in IIS HTTP Headers and ensured
"no-cache" is not added to the Response Header.
Has anyone seen this and knows what is causing it?
Help is much appreciated,
kr