您的位置:首页 > 其它

WCF配置文件设置

2007-04-01 16:59 302 查看
 WCF的配置文件对大小写非常敏感,要求严格使用camel命名方式,否则一定报错,示例代码如下:

 


<?xml version="1.0" encoding="utf-8" ?>


<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">


  <system.serviceModel>


    <services>


      <service name="Blade.WCFService.Service.CalculatorService" behaviorConfiguration="calculatorBehavior">


        <host>


          <baseAddresses>


            <add baseAddress="http://localhost:8088/calculatorService"/>


          </baseAddresses>


        </host>


        <endpoint address="" binding ="basicHttpBinding" contract="Blade.WCFService.Contract.ICalculate"></endpoint>


      </service>


    </services>




    <behaviors>


      <serviceBehaviors>


        <behavior name="calculatorBehavior">


          <serviceMetadata httpGetEnabled="true" httpGetUrl=""/>


        </behavior>


       </serviceBehaviors>


    </behaviors>


    


  </system.serviceModel>


</configuration>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息