I have to connect RabbitMQ Server from localhost. Application is built in c#. I did following settings for connect RabbitMQ
var cf = new ConnectionFactory();
cf.Uri = new Uri("amqps://user:pass@172.20.0.72:5671/vhost");
cf.Ssl.Enabled = true;
cf.Ssl.ServerName = System.Net.Dns.GetHostName();
cf.Ssl.CertPath = @"D:\Vishal_Yagnik\DeskTop_25092018\Certi\test.p12";
cf.Ssl.CertPassphrase = "test";
var connection = cf.CreateConnection();
But I am getting following error.
System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
Is that possible to connect RabbitMQ server from localhost. Also install cert file in local machine.