限制对特定用户的每个文件的访问权限

编程入门 行业动态 更新时间:2024-10-20 21:06:50
本文介绍了限制对特定用户的每个文件的访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

嗨!我有一个包含许多zip文件的文件夹。我wana将每个文件的访问限制为特定用户(每个文件是针对特定用户),其他用户即使拥有它的直接URL也无法访问它。我怎样才能在webamtrix中这样做?文件类型是否与解决方案有关?

Hi! I have a folder containing many zip files. I wana restrict access to each file to a specific user (each file is for a specific user) in a way that other users cant access it even by having it''s direct URL. How can I do this in webamtrix? Does the type of file have anything to do with the solution?

推荐答案

如果使用Windows身份验证和模拟,则可以设置文件系统级别ACL。但这不是一个好主意。 您应该在asp基础上创建自己的文件服务器。这个概念在这里: ASP中的文件下载。 NET并跟踪下载成功/失败的状态 [ ^ ]。例如,您可以扩展它以检查存储在数据库中的用户访问权限,当然也不仅可以访问指定的文件。 If you use windows authentication and impersonation, you can set file system level ACL''s. But that''s not a good idea. You should make your own "file server" on asp base. The concept is here: File Download in ASP.NET and Tracking the Status of Success/Failure of Download[^]. You can extend it to check user access stored in a database for example, and of course to give access not only to a specified file.

更多推荐

限制对特定用户的每个文件的访问权限

本文发布于:2023-10-24 19:54:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524852.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:访问权限   文件   用户

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!