简体   繁体   English

RSA Machine Keys 文件夹为空 - Windows 10

[英]RSA Machine Keys folder is empty - Windows 10

I am trying to test the aspnet_regiis.exe encryption function for a WPF app using the default RsaProtectedConfigurationProvider.我正在尝试使用默认的 RsaProtectedConfigurationProvider 测试 WPF 应用程序的 aspnet_regiis.exe 加密函数。 The encryption command runs successfully, and I can see the connection string section is encrypted;加密命令运行成功,可以看到连接字符串部分被加密了; however, the application crashes at startup.但是,应用程序在启动时崩溃。 It works fine without the encryption.它在没有加密的情况下工作正常。 I have added proper permissions to the machine keys folder as well as the key container, but I also noticed this folder is empty.我已经为机器密钥文件夹和密钥容器添加了适当的权限,但我也注意到这个文件夹是空的。 The path is: C:\\Windows\\System32\\Microsoft\\Crypto\\RSA\\MachineKeys路径为:C:\\Windows\\System32\\Microsoft\\Crypto\\RSA\\MachineKeys

I have also tried exporting from my dev machine and importing the keys on a separate machine (still giving the proper permissions).我还尝试从我的开发机器导出并在单独的机器上导入密钥(仍然给予适当的权限)。 No matter what I try, the machine keys folder is empty and the app fails to launch.无论我尝试什么,机器密钥文件夹都是空的,应用程序无法启动。

My questions are:我的问题是:

Shouldn't my imported keys be showing up in the machine keys folder, and given the appropriate permissions, shouldn't the configuration section be decrypted at runtime allowing the app to work as expected?我导入的密钥不应该出现在机器密钥文件夹中,并给予适当的权限,配置部分不应该在运行时解密以允许应用程序按预期工作吗?

I have checked the windows event logs and found the error(s) which I will share along with the configuration file if necessary.我检查了 Windows 事件日志,发现了错误,如有必要,我将与配置文件一起共享。

I always appreciate any tips or advice, and appreciate your time.我总是很感激任何提示或建议,并感谢您的时间。

Side note - I know this isn't the most secure security practice.旁注 - 我知道这不是最安全的安全实践。

-Thank you -谢谢

On Windows 10 the folder has changed: Now you will find the MachineKeys Folder on this location:在 Windows 10 上,文件夹已更改:现在您将在此位置找到 MachineKeys 文件夹:

C:\\Users\\All Users\\Microsoft\\Crypto\\RSA\\MachineKeys C:\\Users\\All Users\\Microsoft\\Crypto\\RSA\\MachineKeys

The other folder is still there, but it is empty.另一个文件夹仍然存在,但它是空的。

On Windows 10 if you cannot see folder All Users, Find folder on this location在 Windows 10 上,如果您看不到文件夹所有用户,请在此位置查找文件夹

C:\\ProgramData\\Microsoft\\Crypto\\RSA\\MachineKeys C:\\ProgramData\\Microsoft\\Crypto\\RSA\\MachineKeys

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM