I have some exe files that I uploaded to my database, since I do not want them to be public. I tried using the link button and the general handler to work with the file using the following code:
Context.Response.Clear()
Context.Response.ContentType = "application/exe"
Context.Response.AppendHeader("Content-Disposition", "filename=program.exe")
Context.Response.BinaryWrite(binaryfile)
Problem: Google Chrome does not treat downloads like any other exe, instead, after downloading reports, "program.exe usually does not load and can be dangerous." with the "cancel" button and the ability to "save" the download is hidden in the context menu.
Is there any other / better way to service exe files stored in a database?
source
share