2010-05-17 26 views

回答

6

改爲使用System.Threading.Thread.CurrentPrincipal。

此外,不要在客戶端上設置ImpersonateSender - 無論如何都會發送它的憑據。

+0

我看了看,但只給了我一個GenericPrincipal。我需要獲取WindowsIdentity,以便爲用戶獲取Windows令牌。 – 2010-05-17 11:45:01

+0

以不同的方式解決問題: http://stackoverflow.com/questions/2854198/nservicebus-how-to-pass-custom-headers-in-the-message-envelop – 2010-05-18 21:47:45

+1

CurrentPrincipal內部是一個IIdentity,它可以被投射到WindowsIdentity。 – 2010-06-02 14:52:47

相關問題