I am getting error while calling connection.start method in .NET 4.5 version:
System.Security.Authentication.AuthenticationException: 'A call to SSPI failed, see inner exception.'
The same code is working in .NET 6.0 version. I have downgraded the version of Apache.NMS to 1.8.0 and Apache.NMS.ACTIVEMQ to 1.8.0.
I want to integrate the code below to consume the data from Amazon MQ in .NET 4.5 version. I am downgrading and upgrading the dependency using NuGet package manager. Connection.Start
is giving me authentication error.
Uri uri = new Uri("ssl://url:61617");
ConnectionFactory NMSFactory = new ConnectionFactory(uri);
using (IConnection connection = NMSFactory.CreateConnection("Username", "Password"))
{
connection.Start();
using (ISession session = connection.CreateSession())
{
IDestination dest = session.GetQueue("QueueName");
using (IMessageConsumer consumer = session.CreateConsumer(dest))
{
IMessage message = consumer.Receive();
Console.WriteLine("Receive message: " + message.NMSMessageId);
ViewBag.Test = "Received " + message.NMSMessageId;
// Console.WriteLine("Message Coming from Active MQ " + message.)
}
}