NServiceBus icon indicating copy to clipboard operation
NServiceBus copied to clipboard

It is hard to troubleshoot misconfigured endpoint licensing

Open helenktsai opened this issue 3 years ago • 0 comments

Issue transferred from internal repo

If license information is misconfigured/typoed/etc. while there is another valid license (e.g. another trial license) stored in the registry, the information provided to the developer in the logs is not helpful to understand what is going on.

var config = new EndpointConfiguration("Sample");
config.UseTransport<LearningTransport>();
config.SendFailedMessagesTo("error");

config.LicensePath(@"c:\invalid\license.xml");

var endpoint = await Endpoint.Start(config);

(NServiceBus 7.1.4)

The above code, when targeting the full framework, outputs the following:

018-09-26 16:07:40.503 INFO DefaultFactory Logging to 'C:\temp\ConsoleApp1\ConsoleApp1\bin\Debug\net46' with level Info 2018-09-26 16:07:40.762 INFO NServiceBus.LicenseManager Selected active license from HKEY_LOCAL_MACHINE\SOFTWARE\ParticularSoftware License Expiration: 2030-01-01 2018-09-26 16:07:40.770 WARN NServiceBus.LicenseManager Reading license information from the registry has been deprecated and will be removed in version 8.0. See the documentation for more details.

The warning is a red herring for the actual problem which does not have a proper warning.

helenktsai avatar Jul 26 '22 20:07 helenktsai