Hi How to personalize Nservicebus. I am using Nservicebus version 5.2.
I see the code of the old version, but not available in the new version. We have a sample that shows itself in version 5.2.
Configure.With() .StructureMapBuilder() .Sagas() .RunTimeoutManager() .UnicastBus() .ImpersonateSender(false)
There is no way to install in the new version
ImpersonateSender
Does anyone know how to pass the exact currentprincipal object to endpoints?
I tried to run the endpoint below the command line. Start NServiceBus.Host.exe /displayName:"myservice" /username:"mydomain\myname" /password:"mypwd"
However, when I register a username, it does not select the same username that I used to run the endpoint.
public void Customize(BusConfiguration configuration) { configuration.UsePersistence<RavenDBPersistence>() Console.WriteLine("-------------------NAME--------------\n"); Console.WriteLine(WindowsIdentity.GetCurrent().Name); Console.WriteLine("-------------------NAME--------------\n"); Console.WriteLine("-------------------NAME--------------\n"); Console.WriteLine(Thread.CurrentPrincipal.Identity.Name); Console.WriteLine("-------------------NAME--------------\n"); }
the output comes as: ------------------- NAME --------------
MYNetworkDomain \ MyMachineLoggedInNTId ------------------- NAME --------------
------------------- NAME --------------
------------------- NAME --------------
source share