Failed to issue JSON-RPC request. C#

+3 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@169.254.77.138:5765
This host has multiple IP addresses, so from some networks:

multichaind HopeChainCoin@192.168.1.3:5765

Node started

I tried to connect it using c# library
  var client = new MultiChainClient("192.168.1.3:5765", 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. 192.168.1.3:5765 is my public ip. I tried with 192.168.1.3:5765 but nothing changed, i tried 169.254.77.138:5765 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 127.0.0.1 (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).
...