ダイレクトチャネルインターフェイスでWSHttpBindingをSecurityMode: Message
で使用して、WCFサービスの最小限のクライアントを構築しようとしています。チャネルインターフェイス経由でメッセージレベルのセキュリティをサポートする最小限のクライアント
私の現在のコードは非常に簡単です:
EndpointIdentity i = EndpointIdentity.CreateX509CertificateIdentity(clientCertificate);
EndpointAddress a = new EndpointAddress(new Uri("http://myServerUrl"), i);
WSHttpBinding b= new WSHttpBinding(SecurityMode.Message);
ChannelFactory<IRequestChannel> channelFactory = new ChannelFactory<IRequestChannel>(b, a);
channelFactory.Open();
IRequestChannel channel = channelFactory.CreateChannel();
channel.Open();
Message response = channel.Request(requestMessage);
clientCertificateが正しくロードされます。 しかし、その後、すべての関数を正しい方法で呼び出すかどうかはわかりません。
事実である:コードスニペットの最後の行はSspiNegotiationの目的のためのターゲットアドレス「http://myServerUrl」内のアイデンティティに基づいて、サービスプリンシパル名を判断できないコンテンツ
クライアントと
MessageSecurityException
スロー/ Kerberos。ターゲットアドレスIDは、UPN ID(acmedomain \ aliceなど)またはSPN ID(host/bobs-machineなど)である必要があります。
この問題の原因は何ですか?