I've configured the bitcoin.conf and web.config file in visual studio to match, and I keep getting the above exception, also getting this when I run it...

'No connection could be made because the target machine actively refused it'

Only thing I currently have commented out which may be the culprit is;

'add key="Bitcoin_WalletPassword" value=""'

as I'm not sure where to set the corresponding value in bitcoin-qt.


  • Do you have server=1 in your bitcoin.conf? bitcoin-qt doesn't accept RPC connections normally.
    – Nick ODell
    Oct 11 '15 at 19:08
  • @NickODell I do have server=1 and also rpcport=8332 in the bitcoin.config file Oct 11 '15 at 19:28
  • Does it actually have that port open? What does netstat say?
    – Nick ODell
    Oct 11 '15 at 20:05
  • @NickODell netstat wasn't showing 8332 open, showing 8333 open so changed it to that in both files and still no luck! I've had it all working using another RPC wrapper but I want to move to bitcoinlib as it regularly updated. Oct 11 '15 at 20:26
  • @NickODell Solved... in the homecontroller.cs ' when instantiating the BitcoinService the code I was using was setting 'testnet' to true, simply changed this to false (not researched the implications of this yet) and it's now working. Oct 11 '15 at 21:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.