我有一個WCF服務託管在IIS下,負載均衡器後面。在LB上卸載SSL,然後以純HTTP方式調用該服務。通過HTTPS的SOAP端點返回400錯誤請求
我得到了服務的REST端點工作,但我似乎無法讓SOAP端點顯示wsdl頁面。當調用https://domain/Service.svc/soap?wsdl
時,瀏覽器會收到一個400 Bar請求響應。我也檢查了svclog,錯誤是There is a problem with the XML that was received from the network. See inner exception for more details.
這意味着它期待我做一個POST
而不是GET
併發送XML。從CONFIGS
摘錄:
<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
!而非。任何方向讚賞。
它不適用於我... – 2015-05-05 13:26:13