开发者

NServiceBus - How to configure bus to allow WindowsIdentity to flow from client

开发者 https://www.devze.com 2022-12-30 07:03 出处:网络
On the client I have setup the bus with ImpersonateSender(true) My server is configured AsA_Server, which by default should have ImpersonateSender(true)

On the client I have setup the bus with ImpersonateSender(true)

My server is configured AsA_Server, which by default should have ImpersonateSender(true)

开发者_开发技巧

I'm now trying to retrieve the WindowsIdentity, from inside a Handler

var windowsIdentity = WindowsIdentity.GetCurrent(true);

But this is giving me null.

What am I doing wrong?


Use System.Threading.Thread.CurrentPrincipal instead.

Also, don't set ImpersonateSender on the client - it'll send it's credentials regardless.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号