我的Web應用程序設置爲使用Windows身份驗證,並將模擬設置爲true。asp.net模擬設置
<authentication mode="Windows"/>
<identity impersonate="true"/>
當我在本地計算機(IIS6)上運行它時,我使用當前登錄名訪問Active Directory。
WindowsIdentity curIdentity = WindowsIdentity.GetCurrent();
WindowsPrincipal myPrincipal = new WindowsPrincipal(curIdentity);
但是,當我遠程訪問我的網站模擬似乎並沒有工作;我顯示用戶所屬的組 - 並獲得一個非常短的列表!
我還需要什麼?
...除非您使用的是Kerberos。 – JohnFx 2009-12-15 21:18:49
這是真的比這更復雜,你可以開始考慮委派等這樣的工作來解決限制 – 2009-12-15 21:20:26
行,所以只是爲了確認一些東西......沒有辦法得到(正確的)用戶名而不使用kerberos? – 2009-12-15 22:36:15