1
私はcustom binding
の下に作成しています。getting end point address from config
を送信してから、WCFサービスに要求を送信しようとしています。WCFサービスに接続する際の問題
BasicHttpBinding binding = new BasicHttpBinding();
binding.MaxReceivedMessageSize = int.MaxValue;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic;
binding.Security.Mode = BasicHttpSecurityMode.TransportCredentialOnly;
var endpointAddress = "";
ClientSection clientSection = (ClientSection)ConfigurationManager.GetSection("system.serviceModel/client");
for (int i = 0; i < clientSection.Endpoints.Count; i++)
{
if (clientSection.Endpoints[i].Name == "HTTPS_Port")
endpointAddress = clientSection.Endpoints[i].Address.AbsoluteUri;
}
EndpointAddress address = new EndpointAddress(endpointAddress);
MyWCFService svc = new MyWCFService(binding, address);
私はエラー
次提供URIスキーム 'HTTPS' は無効になってしまいます。 。。
クライアントが共有するSOAPサービスに接続しています。私が 'Https'で 'Transport'を使用すると、バインディング(設定ファイル)に証明書が必要ですか?または、このサービスをホストしていたIISのクライアントでこの証明書をインストールする必要がありますか? – simbada
証明書はwcfにのみ固有のものではありません。ホストされたIISマシンにインストールする必要があります。@ simbada – Rajput