c# - 以编程方式获取应用程序池标识

标签 c# iis application-pool applicationpoolidentity

如何在 C# 中以编程方式获取 appPool 的标识?我想要应用程序池用户而不是当前登录的用户。

最佳答案

您可以使用 System.Security.Principal.WindowsIdentity.GetCurrent().Name 来识别当前应用程序在其中运行的标识。 This link提供了一个很好的实用程序,它显示运行 aspx 的身份。

关于c# - 以编程方式获取应用程序池标识,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10101162/

相关文章:

asp.net-mvc - 在 MVC4 中路由带有扩展名的 url 将不起作用,尝试提供静态文件

WCF 线程被中止错误

iis - "Fixed number of requests"后应用程序池回收

iis - 如何重命名已经分配了应用程序的应用程序池?

ssl - 编辑以要求 IIS6 中的 SSL 导致应用程序池回收?

c# - 如何从代码隐藏中触发 jQuery 函数?

c# - 将等于和不等于传递给函数

asp.net - IIS 重写规则 - 如何包含根文档

c# - PDFsharp 保存到 MemoryStream

c# - 外部异常 : A generic error occurred in GDI+