使用登录用户的其他凭据在文件服务器中打开文件 [英] Opening a file in the file server using a different credential that the logged in user

查看:119
本文介绍了使用登录用户的其他凭据在文件服务器中打开文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



我有一个指向文件服务器的WinForms应用程序。向文件服务器授予所有用户ADD / DELETE / MODIFY权限。应用程序控制对文档的访问。但是这种方法的问题在于,如果用户知道文件服务器路径,他们就可以访问路径并删除文件。所以我认为不是为所有用户提供ADD / DELETE / MODIFY访问权限,我们可以限制他们只能读取访问权限,然后创建一个具有DELETE访问权限并使用此凭据访问文件共享资源的普通用户。



有没有想过如何实现?冒充?



谢谢

哈桑

Hi Guys,

I have WinForms application that points to an file server. All users are granted ADD/DELETE/MODIFY permission to the file server.The application controls access to the documents. But the problem with this approach is that if users know about the file server path they could just access the path and delete the files. So i thought instead of providing all users ADD/DELETE/MODIFY access we can restrict their access to only read and then create a common user who would have DELETE access and use this credential to access the resource on file share.

Any thought of how it can be achieved ? Impersonation ?

Thanks
Hassan

推荐答案

是的。请参阅此CodeProject文章:使用C#进行Windows模拟 [ ^ ]。



-SA
Yes. Please see this CodeProject article: Windows Impersonation using C#[^].

—SA


这篇关于使用登录用户的其他凭据在文件服务器中打开文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆