nopara73 / HBitcoin

Privacy focused Bitcoin library on top of NBitcoin for .NET Core.
MIT License
26 stars 11 forks source link

System.IO Exception UWP C:\Users Access Denied #22

Open ghost opened 6 years ago

ghost commented 6 years ago

System.IO Exception UWP C:\Users Access Denied

UWP generally does not allow access to C:\Users and similar folders with mobile and surface, perhaps Documents folder is better? Please fix.

System.UnauthorizedAccessException HResult=0x80070005 Message=Access to the path 'C:\Users' is denied. Source=System.IO.FileSystem StackTrace: at System.IO.Win32FileSystem.CreateDirectory(String fullPath) at System.IO.Directory.CreateDirectory(String path) at HBitcoin.KeyManagement.Safe.Save(String password, String walletFilePath, Network network, DateTimeOffset creationTime) at HBitcoin.KeyManagement.Safe.Create(Mnemonic& mnemonic, String password, String walletFilePath, Network network) at BTCLib.BTCCore.CreateWallet(String password, String userSelectedPath, String[]& words) in D:\InterkrankProjects\crypto-wallets\UWP\BitcoinWallet\btclib\BTCLib\BTCCore.cs:line 178 at BitcoinWallet.MainPage..ctor() in D:\InterkrankProjects\crypto-wallets\UWP\BitcoinWallet\BitcoinWallet\BitcoinWallet\MainPage.xaml.cs:line 44 at BitcoinWallet.BitcoinWallet_XamlTypeInfo.XamlTypeInfoProvider.Activate_0_MainPage() in D:\InterkrankProjects\crypto-wallets\UWP\BitcoinWallet\BitcoinWallet\BitcoinWallet\obj\x64\Debug\XamlTypeInfo.g.cs:line 226 at BitcoinWallet.BitcoinWallet_XamlTypeInfo.XamlUserType.ActivateInstance() in D:\InterkrankProjects\crypto-wallets\UWP\BitcoinWallet\BitcoinWallet\BitcoinWallet\obj\x64\Debug\XamlTypeInfo.g.cs:line 382

muteddisk commented 4 years ago

you need admin right to create file/folder in [system drive]:\users.

Create a sub folder in c:\ and make sure your app has permission to create file/folder for that folder