问题
I have a UWP app that's using client a certificate for SSL authentication. The certificate is stored in user store, the app is declaring "Shared User Certificates" capability in the manifest, I can see the certificate in collection returned by CertificateStores.FindAllAsync
. The app works fine on Windows 10 Desktop -- I can set HttpBaseProtocolFilter.AllowUI = true
and the app shows a confirmation dialog before the private key is used.
However, when I run the same exact code on Windows 10 Mobile, the property assignment throws a System.Exception
: "Element not found. (Exception from HRESULT: 0x80070490)".
Am I doing something wrong? The code is running on UI thread. I guess the phone does not have the certificate UI built in. I can only use a certificate stored in the app's own certificate store (does not require that UI confirmation), but not user store.
来源:https://stackoverflow.com/questions/37115494/cannot-set-httpbaseprotocolfilter-allowui-to-true-on-windows-10-mobile