我在IIS服务器中托管了2个WCF服务。
这里是web.config
<?xml version="1.0"?>
<configuration>
<system.web>
<compilation debug="true" targetFramework="4.0" />
</system.web>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="HttpBinding" />
</basicHttpBinding>
</bindings>
<services>
<service name="BShop.Services.BubensService">
<endpoint address="http://localhost:9001/BubensService" binding="basicHttpBinding"
bindingConfiguration="HttpBinding" name="" contract="BShop.Services.IBubensService" />
</service>
<service name="BShop.Services.OrdersService">
<endpoint address="http://localhost:9001/OrdersService" binding="basicHttpBinding"
bindingConfiguration="HttpBinding" contract="BShop.Services.IOrdersService" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="false"/>
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="false" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
[当我尝试运行它时,我得到了
没有协议绑定与给定 地址 “ http:// localhost:9001 / BubensService”。 协议绑定在以下位置配置 IIS或WAS中的站点级别 配置。
我在配置中错过了什么?