soap11 を使用する Web サービスにアクセスする必要があります...バインディングを次のように設定するだけで問題ありません。
BasicHttpBinding wsBinding = new BasicHttpBinding(BasicHttpSecurityMode.TransportWithMessageCredential);
いいえ。サイコロはありません。そこで、サービスのホストに認証の問題が発生した理由を尋ねたところ、構成にこのカスタム バインディングが必要であるとのことでした。
<bindings>
<customBinding>
<binding name="lbinding">
<security authenticationMode="UserNameOverTransport"
messageSecurityVersion="WSSecurity11WSTrustFebruary2005WSSecureConversationFebruary2005WSSecurityPolicy11"
securityHeaderLayout="Strict"
includeTimestamp="false"
requireDerivedKeys="true"
keyEntropyMode="ServerEntropy">
</security>
<textMessageEncoding messageVersion="Soap11" />
<httpsTransport authenticationScheme ="Negotiate" requireClientCertificate ="false" realm =""/>
</binding>
</customBinding>
</bindings>
唯一の問題は、構成を介さずにプログラムでバインディングを作成していることです。したがって、私の BasicHttpBinding を提供された .config 値に準拠するカスタムバインディングに変更することに関して、誰かが私を正しい方向に向けることができれば、その日に大きな輝く金の星を与えます。