Failed to issue JSON-RPC request. C#

+2 votes
I created a Chain Using Cmd in Windows and started my node. when it started it gave me

Other nodes can connect to this node using:
multichaind HopeChainCoin@
This host has multiple IP addresses, so from some networks:

multichaind HopeChainCoin@

Node started

I tried to connect it using c# library
  var client = new MultiChainClient("", 5765, false, "multichainrpc", "GuzWKwKvWgCASXXXXXXXXXX", "HopeChainCoin");
but when i run the project it gave me error  Failed to issue JSON-RPC request.
 i tried with my public ip too. is my public ip. I tried with but nothing changed, i tried but nothing solved the issue!!.

Can you guide me how to connect the running node in C#?
asked Jan 19, 2018 by Zeshan

1 Answer

0 votes

You have the wrong port number – 5765 s for peer-to-peer connections, not API requests. Please check your chain's params.dat file to see the port used for RPC requests.

answered Jan 19, 2018 by MultiChain
i entered the rpc-port which is 5764, but still getting the same error.
You should use the IP address (local loopback) for connecting to the API, otherwise you would need to use the rpcallowip setting to explicitly enable incoming API connections from a different IP address (even if it's on the same computer).