0
我正在尝试执行HDInsight的作业。 以下是获取证书代码,其在抛出的异常:System.Core.dll中的'System.InvalidOperationException'
X509Certificate2 cert= store.Certificates.Cast<X509Certificate2>().First(item => item.FriendlyName == certFriendlyName);"
// Get the certificate object from certificate store using the friendly name to identify it
X509Store store = new X509Store();
store.Open(OpenFlags.ReadOnly);
X509Certificate2 cert= store.Certificates.Cast<X509Certificate2().
First(item => item.FriendlyName == certFriendlyName);
JobSubmissionCertificateCredential creds =new JobSubmissionCertificateCredential (new Guid(subscriptionID), cert, clusterName);
抛出一个异常,我用下面的命名空间: 使用系统; using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Threading;
using System.Security.Cryptography.X509Certificates;
using Microsoft.WindowsAzure.Management.HDInsight;
using Microsoft.Hadoop.Client;
using System.Linq;
它继续抛出一个异常,我找不到任何解决方案上的MSDN,除了一些类似的职位,其中解决方案是使用System.Linq,我已经在这里使用。 –