.Net Core and on premise service bus

Feb 4 at 9:10 PM
Edited Feb 4 at 9:10 PM
When trying to connect to a topic using the on premise service bus I in .Net Core I get the following errormessage:

'Sasl negotiation failed with code Sys.'

The same code runs fine using .Net 4.x

Here is a snippet from the relevant code
Address address =
            new Address(string.Format("amqps://{0}:{1}@{2}:{4}/{3}/", Uri.EscapeDataString(username), Uri.EscapeDataString(password), hostname, ns, "5671"));
        var connection = await Connection.Factory.CreateAsync(address);
The error is thrown when calling the CreateAsync method.