Note that there are some explanatory texts on larger screens.

plurals
  1. PONServiceBus impersonation issue after upgrading from 2.6 to 3.0
    text
    copied!<p>I've just upgraded from NSB 2.6 to 3.0 and I'm having an issue with NSB throwing an ArgumentNullException when raising transport message:</p> <pre><code>NServiceBus.Unicast.Transport.Transactional.TransactionalTransport [(null)] &lt;(null)&gt; - Failed raising 'transport message received' event for message with ID=21d502f4-0e66-4d1e-801c10ddc1cbe40a\34416 System.ArgumentNullException: Value cannot be null. Parameter name: name at System.Security.Principal.GenericIdentity..ctor(String name) at NServiceBus.Impersonation.ImpersonationManager.Transport_TransportMessageReceived(Object sender, TransportMessageReceivedEventArgs e) at System.EventHandler`1.Invoke(Object sender, TEventArgs e) at NServiceBus.Unicast.Transport.Transactional.TransactionalTransport.OnTransportMessageReceived(TransportMessage msg) </code></pre> <p>The scenario is a web app that sends a message to an endpoint currently hosted in a console (but will run as a Windows Service).</p> <p>The configuration for the web app:</p> <pre><code>Configure.WithWeb() .Log4Net() .DefaultBuilder() .XmlSerializer() .MsmqTransport() .IsTransactional(false) .PurgeOnStartup(false) .UnicastBus() .ImpersonateSender(false) .CreateBus() .Start(); </code></pre> <p>The endpoint uses the Production profile and has following configuration:</p> <pre><code> Configure.With() .StructureMapBuilder() .Sagas() .RunTimeoutManager() .UnicastBus() .ImpersonateSender(false) </code></pre> <p>As you can see, Impersonation is turned off both in the web app as well as in the endpoint (Prior to upgrading I didn't configure Impersonation on the endpoint), but still NSB is trying to impersonate, and failing at it because the WinIdName is null in the message header.</p> <p>The issue is, why is NSB trying to impersonate when it is configured not to do so, and what has changed since 2.6 causing this to suddenly fail?</p> <p><strong>EDIT:</strong> As I investigate further, it looks like it tries to impersonate the user of the web app when sending the message to the endpoint even though it is configured not to do so.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload