12
C'è qualcuno che ha avuto problemi con classe X509Certificate2UI in un'applicazione Asp Net MVC4nome 'X509Certificate2UI' non esiste nel contesto corrente
using System.Security.Cryptography.X509Certificates;
private static X509Certificate2 PickCertificate(StoreLocation location, StoreName name)
{
try
{
store.Open(OpenFlags.ReadOnly);
//PROBLEM IS HERE
X509Certificate2 cert = X509Certificate2UI.SelectFromCollection(store.Certificates, "Caption", "Message", X509SelectionFlag.SingleSelection)[0];
}
catch (Exception)
{
throw;
}
}
Si lamenta del fatto che non v'è alcun nome 'X509Certificate2UI' nel contesto attuale No idea poiché la classe è in System.Security.Cryptography.X509Certificates;
Prova ora, ho modificato la mia prima risposta, non ho letto chiaramente la domanda. :( – freshbm
È meglio, ho scoperto che prima, ora potevo testarlo e funziona bene Riferimento: http://www.pcreview.co.uk/forums/missing-x509certificate2ui-class-t2311992.html –