Cannot reply to gateway messages over HTTPS - KeyNotFoundException thrown
I'm using NSB 3.2.7
Configuration of SSL:
I've created a self-signed SSL certificate using
makecert -n "CN=localhost" -r -pe -eku 1.3.6.1.5.5.7.3.1 -ss MY -sr localmachine -sky exchange
Using mmc console Certificates snap-in & wizards, I copied my localhost certificate from Personal->Certificates to Trusted Root Certification Authorities
I then used the above certificate's thumbprint (found by double clicking the certificate->Details tab) to configure a HTTPS port
netsh http add sslcert ipport=0.0.0.0:25899 certhash=thumbprint appid={461f29bc-9243-4930-a132-88419d8d53cb}
note: the appid is irrelevant and can be any valid Guid
Ran the gateway sample.
Both sites (SiteA and SiteB) receive the PriceUpdated message
However, SiteA is unable to reply to the gateway message - Headers.DestinationSites contains http,https://localhost:25899/Headquarter/NumberOfWorkerThreads=1Default=False
However, GatewaySender.OnTransportMessageReceived sees https as the channel type
For some reason, the Headers.OriginatingSite is not present in the headers
Headquarter
<GatewayConfig>
<Sites>
<Site Key="SiteA" Address="https://localhost:25899/SiteA/" ChannelType="Http"/>
<Site Key="SiteB" Address="https://localhost:25899/SiteB/" ChannelType="Http"/>
</Sites>
<Channels>
<Channel Address="https://localhost:25899/Headquarter/" ChannelType="Http" Default="true"/>
<Channel Address="https://localhost:25899/Headquarter2/" ChannelType="Http"/>
</Channels>
</GatewayConfig>
SiteA
<GatewayConfig>
<Channels>
<Channel Address="https://localhost:25899/SiteA/" ChannelType="Http" Default="true"/>
</Channels>
</GatewayConfig>
SiteB
<GatewayConfig>
<Channels>
<Channel Address="https://localhost:25899/SiteB/" ChannelType="Http" Default="true"/>
</Channels>
</GatewayConfig>
How to test
See above
Will be fixed with https://github.com/NServiceBus/NServiceBus/pull/619
Thanks Andreas
One more thing about the SSL config. The certificate thumbprint that gets passed into thenetshcommand should have all spaces removed.