Getting an error "underlying connection was closed"

+1 vote
asked Sep 21, 2017 by Vignesh.s
Where are you getting this error from and what were you doing at the time?
More details please. Where are you getting that error for example? Steps to generate the error?

If you would like help, please elaborate more and provide more information
That error is generating in JsonRpcClient.cs file and line number is 44
MultiChainConnection connection = new MultiChainConnection()
            {
                Hostname = "MYIP",
                Port = MYPORT,
                Username = "multichainrpc",
                Password = "password",
                ChainName = "chain1",
                BurnAddress = "Myaddress",
                RootNodeAddress = "Myaddress"
            };
            
MultiChainClient _Client = new MultiChainClient(connection);
response = _Client.Utility.GetInfo();

I try to call above method and node was started in my local machine & error message (Exception) is showing on the below method "JsonRpcClient.cs"

public JsonRpcResponse<T> Execute<T>(string method, int id, params object[] args)
        {
            JsonRpcResponse<T> response = new JsonRpcResponse<T>();
            Task.Run(async () =>
            {
                response = await ExecuteAsync<T>(method, id, args);
            }).GetAwaiter().GetResult();

            return response;
        }

1 Answer

0 votes
Since this is an error given by a third party library your best bet is to reach out to that library's author and ask them to answer the question here.
answered Sep 22, 2017 by MultiChain
...