Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path). error when backuping wallet using BitcoinLib in C#

I'm currently working on a little program for backing up your Bitcoin Core wallet. I am using BitcoinLib v1.15.0 in C#.

IBitcoinService bitcoinService = new BitcoinService("http://127.0.0.1:8332", "test", "test", "", 60);
bitcoinService.BackupWallet("C:\\Users\\dominik\\OneDrive\\Desktop\\backup");

When I run this code I get following error message Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path). I am a bit confused, because the BitcoinService.backupwallet(string destination) function has only one input parameter which I assume describes the path where it should generate the backup file (or at least that's the way this command works in Bitcoin Core's terminal).

Is there anyone with experience with BitcoinLib or similar problem. I am open to any suggestions. The error is related to multiple wallets open at once in Bitcoin Core.

like image 746
Mr Incognito Avatar asked Oct 12 '20 20:10

Mr Incognito


1 Answers

It worked after I've added /wallet/<wallet_name> to the RPC URL

like image 180
Vassily Avatar answered Nov 13 '22 18:11

Vassily