0

最近、REST および SOAP エンドポイントを介して公開される WCF サービスの 1 つに HTTPS を追加しました。

この変更を行ったとき、SOAP エンドポイントで修正が見つからない問題が発生しています。

私が現在抱えている問題は、HTTP エンドポイントが消費されると、WSDL で指定された SOAP アドレスがローカル アドレスを指していることです。これにより、サービスを HTTP 経由で使用できず、HTTPS のみで使用できるようになります。

関連するセクションの web.config は次のとおりです。

<system.serviceModel>
<bindings>
<basicHttpBinding>
    <binding name="basicHttpsBinding">
      <security mode="Transport"/>
    </binding>
  </basicHttpBinding>
</bindings>
<services>
  <service behaviorConfiguration="MyServiceBehavior"
           name="Some.Path.To.MyService">
    <endpoint address="" binding="basicHttpBinding"
              bindingConfiguration="basicHttpsBinding"
              contract="Some.Path.To.IMyService"/>
  <endpoint contract="IMetadataExchange" binding="mexHttpBinding" address="mex" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="PingPostServiceBehavior">
      <serviceThrottling maxConcurrentInstances="800"
                         maxConcurrentCalls="800"
                         maxConcurrentSessions="800"/>
      <!--<useRequestHeadersForMetadataAddress/>-->
      <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
      <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
      <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>

PRODUCTION HTTP WSDL アドレスに移動すると、次の図に示すように、soap アドレス要素でローカル アドレスが指定されます。悪い検閲の仕事についてお詫び申し上げます。

ここに画像の説明を入力

4

0 に答える 0