4
流在客戶端我已經設置了總線ImpersonateSender(true)
NServiceBus - 如何總線配置爲允許的WindowsIdentity從客戶
我的服務器配置AsA_Server
,默認情況下應該有ImpersonateSender(true)
我現在試圖從處理程序中檢索WindowsIdentity
var windowsIdentity = WindowsIdentity.GetCurrent(true);
但是,這給了我null。
我在做什麼錯?
我看了看,但只給了我一個GenericPrincipal。我需要獲取WindowsIdentity,以便爲用戶獲取Windows令牌。 – 2010-05-17 11:45:01
以不同的方式解決問題: http://stackoverflow.com/questions/2854198/nservicebus-how-to-pass-custom-headers-in-the-message-envelop – 2010-05-18 21:47:45
CurrentPrincipal內部是一個IIdentity,它可以被投射到WindowsIdentity。 – 2010-06-02 14:52:47