【问题标题】:Different ways to get WindowsIdentity with impersonation in aspnet app在 aspnet 应用程序中通过模拟获取 WindowsIdentity 的不同方法
【发布时间】:2011-06-17 14:48:58
【问题描述】:

应用程序正在使用模拟和 Windows 身份验证运行。 这三种情况我得到的有什么不同?

  • System.Threading.Thread.CurrentPrincipal.Identity 作为 WindowsIdentity

  • WindowsIdentity.GetCurrent()

  • ((HttpContext) 上下文).User.Identity 作为 WindowsIdentity

【问题讨论】:

    标签: c# asp.net windows-authentication impersonation


    【解决方案1】:

    Here 你有所有不同的可能性。在您的情况下,所有 3 (Domain\UserName) 都会得到相同的结果

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-12-08
      • 1970-01-01
      • 1970-01-01
      • 2019-10-20
      • 1970-01-01
      • 2011-10-10
      • 1970-01-01
      • 2012-04-04
      相关资源
      最近更新 更多