C# - 获取 ASPNET WindowsIdentity

发布于 2024-07-21 08:17:16 字数 94 浏览 6 评论 0原文

我想授予 ASPNET 用户对多个文件的完全控制权,但看起来我需要首先获取帐户的令牌。 有谁知道如何在桌面应用程序中模拟 ASPNET 帐户?

谢谢!

I'd like to give the ASPNET user Full Control over several files, but it looks like I'll need to get the account's token first. Does anyone know how to impersonate the ASPNET account within a desktop app?

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独留℉清风醉 2024-07-28 08:17:16

以下是使用 WindowsIdentity.Impersonate另一个示例。 您必须拥有 已知进程标识,ASP.NET 才能跑在下面。

Here is an example of impersonating another use with WindowsIdentity.Impersonate and another example. You will have to have a known process identity for ASP.NET to run under.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文