No protocol bindings were matched to the given address ' {0} '. Protocol bindings are configured at the site level in IIS or was configurations.

Source: Internet
Author: User

a server error in the "/WCF" application. There is no protocol binding that matches the given address "http://localhost:8001/WCFService.HelloService". Protocol bindings are configured at the site level in IIS or was configurations.

This error indicates that the configuration file is not configured correctly.

Error:

<system.serviceModel>
<services>
<service behaviorconfiguration= "Wcfservice.service1behavior"
Name= "Wcfservice.helloservice" >
<!--<baseAddresses>
<add baseaddress= "http://localhost:8001/"/>
</baseAddresses>
<endpoint address= "Http://localhost:8001/HelloService" binding= "Wshttpbinding" Wcfservice.ihelloservice ">
</endpoint>

<!--<endpoint address= "Mex" binding= "mexHttpBinding" contract= "IMetadataExchange"/>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name= "Wcfservice.service1behavior" >
<!--to avoid leaking metadata information, set the following value to False before deployment and delete the metadata endpoint above-->
<servicemetadata httpgetenabled= "true"/>
<!--to receive fault exception details for debugging, set the following value to True. Set to false before deployment to avoid leaking exception information-->
<servicedebug includeexceptiondetailinfaults= "false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

Correct:

<system.serviceModel>
<services>
<service behaviorconfiguration= "Wcfservice.service1behavior"
Name= "Wcfservice.helloservice" >
<baseAddresses>
<add baseaddress= "http://localhost:8001/"/>
</baseAddresses>
<endpoint address= "HelloService" binding= "Wshttpbinding" contract= "Wcfservice.ihelloservice" >
</endpoint>

<!--<endpoint address= "Mex" binding= "mexHttpBinding" contract= "IMetadataExchange"/>-->
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name= "Wcfservice.service1behavior" >
<!--to avoid leaking metadata information, set the following value to False before deployment and delete the metadata endpoint above-->
<servicemetadata httpgetenabled= "true"/>
<!--to receive fault exception details for debugging, set the following value to True. Set to false before deployment to avoid leaking exception information-->
<servicedebug includeexceptiondetailinfaults= "false"/>
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.