本文介绍了限制对特定用户的每个文件的访问权限的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨!我有一个包含许多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.
更多推荐
限制对特定用户的每个文件的访问权限
发布评论