Right now I have an application on my website that users can easily download from my website, is there a way to hide or make it really hard to be able to find my application, so people can't just add /files/App.exe into the end of my domain to get my app? What do you recommend?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Hiding your exe could be accomplished by
- Create a unique identifier (perhaps a GUID)
- Associate this with a file name for download and an expiration date (in a DB, perhaps)
- Create a page that takes the unique ID as a parameter
- Have this page check the DB for the unique id and ensure it hasn't passed the expiration date
- Send the file to the client, setting Content-Disposition header to attachment
If you are using ASP.NET this example will help you
回答2:
If u are using asp.net create a httphandler and map it in your web.config to the path of app.exe.. and just do response.write("get out") and log the details of the request.....equivalents are available on all popular platforms...