Good Day,
I am trying to work on a Hello world web application using LucidOcean.Multichain assembly using C# in Microsoft Visual Studio 2017. I am just trying to make a connection from the server to the server.
Following is my sample code taken from Multichain Developers website
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
MultiChainConnection connection = new MultiChainConnection()
{
Hostname = "xxx.xxx.xx.79",
Port = 7349,
Username = "multichainrpc",
Password = "F4oMLnguUvNYyT6ZUjKQY7r7auGCYzgB8NncZDdZS8QE",
ChainName = "ChainName",
BurnAddress = "1XXXXXXWzyXXXXXXg2XXXXXXcTXXXXXXXqFAPD",
RootNodeAddress = "1WNtXcjb8L9c96JnQbwsQKFPBxgnm1AJK5zd5F"
};
MultiChainClient _Client = new MultiChainClient(connection);
JsonRpcResponse<string> response= _Client.Wallet.GetNewAddress();
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
When I run the daemon command, resulting information gives me two ports to work with,
First port is 7349 given in the following lines
If I use 7349 as a port, code throws following exception
The underlying connection was closed: The connection was closed unexpectedly
Second port is 7348 taken from following lines
- Listening for API requests on port 7348 (local only - see rpcallowip setting)
If use 7348 as a port, code throws following exception
Unable to connect to the remote server, No connection could be made because the target machine actively refused it 169.254.88.79:7348
Please advise what port I should use and what could be the problem prohibiting the connection?