英文:
In IIS, is there a way to limit how many times a particular file can be served?
问题
Is there any easy way in IIS of limiting the number of times files in a particular folder are served before requests will be refused?
英文:
My webpage automatically creates a .pdf file and a link to go with it. I want the user to be able to download the file from the link-- but only once (or maybe 5x or whatever I decide later).
Is there any easy way in IIS of limiting the number of times files in a particular folder are served before requests will be refused?
答案1
得分: 0
IIS中没有相关配置可以限制用户下载次数。您可以在您的程序中完全实现您的需求。添加代码来统计当前登录用户的下载次数,并根据您设置的限制次数来限制用户。
英文:
There is no relevant configuration in IIS that can limit the number of user downloads.
You can completely implement your needs in your program. Add the code to count the number of downloads by the currently logged in user. Restrict users according to the limit times you set.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论