我正在尝试从 Windows 获取用户名和域,使用
WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent();
windowsIdentity.Name;
但它总是返回“IIS APPPOOL\DefaultAppPool”。我该怎么做才能返回正确的值?
谢谢
我正在尝试从 Windows 获取用户名和域,使用
WindowsIdentity windowsIdentity = WindowsIdentity.GetCurrent();
windowsIdentity.Name;
但它总是返回“IIS APPPOOL\DefaultAppPool”。我该怎么做才能返回正确的值?
谢谢