Bitcoin Forum
June 17, 2024, 08:16:55 AM *
News: Voting for pizza day contest
 
  Home Help Search Login Register More  
  Show Posts
Pages: [1]
1  Bitcoin / Bitcoin Technical Support / Re: connect to bitcoian core via c# on: January 08, 2023, 07:24:46 AM


a little error ,the word in bitcoin.conf:

rpcpass=mypass

is wrong must be :

rpcpassword=mypass

i change it and it worked fine
2  Bitcoin / Bitcoin Technical Support / Re: connect to bitcoian core via c# on: December 26, 2022, 02:28:49 PM
i am beginner in dealing with bitcoian core ,
 how to configure Bitcoin Core to accept RPC connection?
as for 2. I checked the demo code and it use testnet by default[2]. Did you make change to make it connect to mainnet instead? there is option in the demo to use testnet  or not , i try the two options but did not connect,here is the code:
  private static readonly ICoinService CoinService = new BitcoinService(useTestnet: true);
3  Bitcoin / Bitcoin Technical Support / connect to bitcoian core via c# on: December 26, 2022, 08:59:21 AM
hi , i download bitcoin core from here https://bitcoin.org/en/download and try to connect to it from c# i use the demo code from here https://github.com/cryptean/bitcoinlib i set bitcoin.conf
but error happens , here is error message :
Connecting to Bitcoin MainNet via RPC at http://127.0.0.1:8332...An unknown web exception occured while trying to read the JSON response
   at BitcoinLib.RPC.Connector.RpcConnector.MakeRequest[T](RpcMethods rpcMethod, Object[] parameters) in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\src\BitcoinLib\RPC\Connector\RpcConnector.cs:line 132
   at BitcoinLib.Services.CoinService.GetDifficulty() in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\src\BitcoinLib\Services\RpcServices\RpcService\RpcService.cs:line 225
   at ConsoleClient.Program.Main() in C:\Users\pc\Downloads\bitcoinlib-master\bitcoinlib-master\demo\Program.cs:line 104

C:\Program Files\dotnet\dotnet.exe (process 9492) exited with code 0.
To automatically close the console when debugging stops, enable Tools->Options->Debugging->Automatically close the console when debugging stops.
Press any key to close this window . . .
i even write a question in stackoverflow site here https://stackoverflow.com/questions/74886756/unknown-web-exception-occured-while-trying-to-read-the-json-response-bitcoin-cor  but no one answer it ,my question what the wrong i do and how to fix it , and what exactly the steps to connect from c# to bitcoin core, Thanks.
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!