1

ロード バランサーの背後にある IIS でホストされている WCF サービスがあります。SSL は LB でオフロードされ、サービスはプレーン HTTP で呼び出されます。

サービスの REST エンドポイントは機能していますが、SOAP エンドポイントで wsdl ページを表示するようにはできません。ブラウザーを呼び出すとhttps://domain/Service.svc/soap?wsdl、400 Bar Request 応答が受信されます。私もsvclogを調べましたが、エラーは、代わりにXMLを送信するThere is a problem with the XML that was received from the network. See inner exception for more details.ことを期待していたことを意味します。POSTGET

構成からのスニペット:

<bindings>
    <basicHttpBinding>
        <binding name="basicBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
          <security mode="Transport"></security>
          <readerQuotas maxStringContentLength="2147483647" />
        </binding>
    </basicHttpBinding>
    <webHttpBinding>
        <binding name="webBinding" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
            <security mode="Transport"></security>
        </binding>
   </webHttpBinding>
</bindings>

<services>
    <service behaviorConfiguration="MyServiceBehavior" name="Namespace.Service">
        <endpoint address="" behaviorConfiguration="MyRESTBehavior" binding="webHttpBinding" bindingConfiguration="webBinding" name="REST" contract="Namespace.IService" />
        <endpoint address="https://domain/Service.svc/soap" binding="basicHttpBinding" bindingConfiguration="basicBinding" name="SOAP" contract="Namespace.IService" />
    </service>
</services>

<behaviors>
    <serviceBehaviors>
        <behavior name="MyServiceBehavior">
            <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
            <serviceDebug includeExceptionDetailInFaults="true"/>
            <dataContractSerializer maxItemsInObjectGraph="6553600" />
        </behavior>
    </serviceBehaviors>
    <endpointBehaviors>
        <behavior name="MyRESTBehavior">
            <webHttp/>
        </behavior>
    </endpointBehaviors>
</behaviors>

wsHttpBinding も使用してみましたが、唯一の異なる結果は401代わりに s を取得することでした。任意の指示をいただければ幸いです。

4

2 に答える 2

0

見つけた。サービスを 2 回公開するというエラーが発生したため、以前httpsGetUrlに から属性を削除しました。serviceMetadataエラーはおそらくタイプミスによるものであり、削除すべきではなかったと思いますhttpsGetUrl。セクションを以下のセクションに変更するbehaviorsと、問題が解決しました。

<behaviors>
    <serviceBehaviors>
        <behavior name="MyServiceBehavior">
            <serviceMetadata httpGetEnabled="false" httpsGetEnabled="true" httpsGetUrl="https://domain/Service.svc/soap" />
            <serviceDebug includeExceptionDetailInFaults="true"/>
            <dataContractSerializer maxItemsInObjectGraph="6553600" />
        </behavior>
    </serviceBehaviors>
    <endpointBehaviors>
        <behavior name="MyRESTBehavior">
            <webHttp/>
        </behavior>
    </endpointBehaviors>
</behaviors>
于 2011-05-16T12:56:25.060 に答える
0

basicHttpBinding エンドポイントに絶対アドレスを使用できるとは思えません。代わりにこれを試してください:

<endpoint address="soap" binding="basicHttpBinding" bindingConfiguration=...

WSDL にアクセスするには、URL は「https://domain/soap/Service.svc?wsdl」のようになります。IIS と WCF では、仮想ディレクトリの URL をオーバーライドできません。エンドポイント アドレスの値は、Web サイトの URL に対して相対的である必要があります。

于 2011-05-10T12:58:23.400 に答える