S
Shifali
Hi,
I am using following code to download '.exe' file in c#. This code is
working fine in all other browsers but it gives error in IE6.0 as:
'Internet explorer can not download file from .Internet Explorer was not
able to open the site. The requested site is either unavailable or can not be
found.'
public void DownloadSetup()
{
String filePath =
Server.MapPath("./ABDownload/GulAktivBedrift.exe");
if (System.IO.File.Exists(filePath))
{
Response.ContentType = "application/exe";
Response.AddHeader("Content-Disposition", "attachment;
filename=" + System.IO.Path.GetFileName(filePath));
Response.Clear();
Response.WriteFile(filePath);
HttpContext.Current.ApplicationInstance.CompleteRequest();
//Response.End();
}
}
My c# code is as follows
I am using following code to download '.exe' file in c#. This code is
working fine in all other browsers but it gives error in IE6.0 as:
'Internet explorer can not download file from .Internet Explorer was not
able to open the site. The requested site is either unavailable or can not be
found.'
public void DownloadSetup()
{
String filePath =
Server.MapPath("./ABDownload/GulAktivBedrift.exe");
if (System.IO.File.Exists(filePath))
{
Response.ContentType = "application/exe";
Response.AddHeader("Content-Disposition", "attachment;
filename=" + System.IO.Path.GetFileName(filePath));
Response.Clear();
Response.WriteFile(filePath);
HttpContext.Current.ApplicationInstance.CompleteRequest();
//Response.End();
}
}
My c# code is as follows