以编程方式获取应用程序池标识 [英] Get the Application Pool Identity programmatically
本文介绍了以编程方式获取应用程序池标识的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在 C# 中以编程方式获取 appPool 的标识?我想要应用程序池用户而不是当前登录的用户.
How do I get the identity of an appPool programmatically in C#? I want the application pool user and NOT the user who is currently logged in.
推荐答案
您可以使用 System.Security.Principal.WindowsIdentity.GetCurrent().Name
来标识当前应用程序所在的 Identity跑步.此链接提供了一个很好的实用程序,可以显示身份aspx 已运行.
You could use System.Security.Principal.WindowsIdentity.GetCurrent().Name
to identify the Identity in which the current application is running. This link provides a nice utility which displays the identity under which the aspx is run.
这篇关于以编程方式获取应用程序池标识的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文