繁体   English   中英

ASP.NET Forms 身份验证和 Active Directory 模拟

[英]ASP.NET Forms Authentication and Active Directory Impersonation

我正在编写一个 web 应用程序(在 C# 中),我需要使用与本地登录到 Windows 的用户不同的凭据登录到 web 页面。 该页面在 web 服务器上执行一个进程,但它以登录到 web 页面的用户身份执行。 登录到 web 页面的用户已针对 Active Directory 进行身份验证。 I've used Windows Authenication and ASP.NET impersonation to launch processes on the web server, and I can create a site that uses forms authentication against AD, however I can't find a good article that explains how to run a process impersonating a user that已使用 AD 的 forms 身份验证登录。 每当我运行任何东西时,它都会给我一个错误,因为它试图以“NT AUTHORITY\IUSR”的身份运行。 有谁知道任何好的文章,或者你能给我任何代码示例吗?

提前致谢,

富有的

看一下ProecessStartInfo - 您可以设置安全性等(如果您的线程已经在模拟运行,那么您可以从System.Threading.Thread.CurrentThread / CurrentPrincipal获取一些必要的信息)然后调用Preocess.Start

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM