在IIS中,是否有一种方法可以限制特定文件可以被提供的次数?

huangapple go评论47阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2023年2月6日 08:37:16
  • 转载请务必保留本文链接:https://go.coder-hub.com/75356477.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定