したがって、次のシステムがあります。次のようにサービスを要求するクライアントアプリがあります。
blar.ServiceSecurity wsSecurity = new blar.ServiceSecurity();
wsSecurity.Url = this.tURL + "Security.asmx";
CookieContainer cc = new CookieContainer();
wsSecurity.CookieContainer = cc;
wsSecurity.ClientCertificates.Add(X509Certificate.CreateFromCertFile(certPath));
blar.LoginResult lr = wsSecurity.Login(login, password);
次に、this.tURL + "Security.asmx"
のLogin
メソッドの Web サービスは、その ClientCertificate (certPath) を次から取得する必要があります。
Context.Request.ClientCertificate.Certificate;
そしてそれで何かをします。
問題が 2 つあります。IIS
の構成で と表示されている場合、Login 関数の呼び出しでRequire client certificates
403.7エラーが発生します。
IIS の構成に「m_safeCertContextは無効なハンドルです」というCryptographicExceptionが表示される場合。Accept client certificates
ただし、これらの問題は、クライアントが Windows 7 x64 から動作する場合にのみ発生し、Windows XP または Windows Server 2003 で起動した場合でも、問題なく動作します。
ca は両方のマシンにインストールされており、構成はすべてのテスト ケースで完全に同一のよう
です。