2

UAT 環境を介して Web サービスを呼び出そうとすると、以下のエラーが発生します。ただし、私のローカルでは正常に動作しています。ダミーの証明書が原因である可能性があるため、コメントが表示されますが、回答が得られなかったため、ここに投稿します。また、私は WCF の初心者です。これを修正する方法を教えてください。

すべてを信頼した場合、本番環境にどのような影響がありますか

//Trust all certificates
        System.Net.ServicePointManager.ServerCertificateValidationCallback =
            ((sender, certificate, chain, sslPolicyErrors) => true);

エラーは言う - System.ServiceModel.Security.SecurityNegotiationException: 権限を持つ SSL/TLS セキュア チャネルの信頼関係を確立できませんでした。---> System.Net.WebException: 基になる接続が閉じられました: SSL/TLS セキュア チャネルの信頼関係を確立できませんでした。---> System.Security.Authentication.AuthenticationException: 検証手順によると、リモート証明書は無効です。

バインディングは

  <basicHttpBinding>
    <binding name="GLEditServiceSOAP" closeTimeout="00:01:00" openTimeout="00:01:00"
      receiveTimeout="00:10:00" sendTimeout="00:01:00" allowCookies="false"
      bypassProxyOnLocal="false" hostNameComparisonMode="StrongWildcard"
      maxBufferSize="65536" maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
      messageEncoding="Text" textEncoding="utf-8" transferMode="Buffered"
      useDefaultWebProxy="true">
      <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
        maxBytesPerRead="4096" maxNameTableCharCount="16384" />
      <security mode="Transport">
        <transport clientCredentialType="None" proxyCredentialType="None"
          realm="" />
        <message clientCredentialType="UserName" algorithmSuite="Default" />
      </security>
    </binding>

また、私のローカルホストでどのように機能しているのか疑問に思います。

4

1 に答える 1