<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="testWebServiceSoap" />
</basicHttpBinding>
<customBinding>
<binding name="testWebServiceSoap12">
<textMessageEncoding messageVersion="Soap12" />
<httpTransport />
</binding>
</customBinding>
</bindings>
<client>
<endpoint address="http://localhost:3360/WebServices/testWebService.asmx"
binding="basicHttpBinding" bindingConfiguration="testWebServiceSoap"
contract="ServiceReference1.testWebServiceSoap" name="testWebServiceSoap" />
<endpoint address="http://localhost:3360/WebServices/testWebService.asmx"
binding="customBinding" bindingConfiguration="testWebServiceSoap12"
contract="ServiceReference1.testWebServiceSoap" name="testWebServiceSoap12" />
</client>
</system.serviceModel> 导致的原因是多了一段,删除这里即可:
       <endpoint address="http://localhost:3360/WebServices/testWebService.asmx"
binding="customBinding" bindingConfiguration="testWebServiceSoap12"
contract="ServiceReference1.testWebServiceSoap" name="testWebServiceSoap12" />
04-05 01:36