G
Guest
Hi there!
I'm trying to download a file in my asp.net web, but when downloading it
from a Firefox browser, instead of downloading the example.exe file, it's
downloading example.exe.htm. My code is the following:
string localfile = MyComponent.DownloadMyExe(index);
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType="application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" +
Regex.Replace(localfile, @"\\\\(\w)*\\(\w)*\\(\w)*\\(?<Name>)*", "${Name}"));
Response.WriteFile(localfile);
Response.End();
With IE runs fine. Which is the problem, anyone knows?
Thanks a lot!
I'm trying to download a file in my asp.net web, but when downloading it
from a Firefox browser, instead of downloading the example.exe file, it's
downloading example.exe.htm. My code is the following:
string localfile = MyComponent.DownloadMyExe(index);
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType="application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" +
Regex.Replace(localfile, @"\\\\(\w)*\\(\w)*\\(\w)*\\(?<Name>)*", "${Name}"));
Response.WriteFile(localfile);
Response.End();
With IE runs fine. Which is the problem, anyone knows?
Thanks a lot!