获取应用程序池标识编程 [英] Get the Application Pool Identity programmatically

查看:215
本文介绍了获取应用程序池标识编程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何得到一个程序池的标识采用C#编程?我想要的应用程序池的用户和不是谁当前登录的用户。

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()。名称来识别身份其中电流应用程序正在运行。 此链接提供了一个很好的工具,它显示根据该身份在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屋!

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