我在WCF代理拿到機器名和獲得例外低於同時調用WCF服務如何使用域名替換計算機名稱在WCF服務
The remote server returned an error: (415) Cannot process the message because the content type 'application/soap+xml; charset=utf-8' was not the expected type 'text/xml; charset=utf-8'..HTTP GET Error
URI: http://MyDomine.com/TCIService/TCIService/TCIService.svc?wsdl
The document was understood, but it could not be processed. - The WSDL document contains links that could not be resolved. - There was an error downloading ' http://MyMachine.Name/TCIService/TCIService/TCIService.svc?xsd=xsd0 '. - The remote name could not be resolved: 'MyMachineName'
任何一個可以幫我解決這個問題。下面是我的web.config
<system.serviceModel>
<services>
<service name="MyService.TCIService.TCIService" behaviorConfiguration="MyServiceBehaviour" >
<endpoint address="Account" binding="basicHttpBinding" contract="MyService.TCIContract.IAccount" >
</endpoint>
<endpoint address="Location" binding="basicHttpBinding" contract="MyService.TCIContract.ILocation" >
</endpoint>
<endpoint address="Camera" binding="basicHttpBinding" contract="MyService.TCIContract.ICamera" >
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange">
</endpoint>
<!--<host>
<baseAddresses>
<add baseAddress="http://localhost:8080/"></add>
</baseAddresses>
</host>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="MyServiceBehaviour">
<serviceMetadata httpGetEnabled="true" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
請問您可以發佈您的服務合同和類型嗎? – 2014-11-21 13:06:27