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>
<?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>
相关文章推荐
- wcf学习第4天(通过配置文件来设置)
- WCF数据传输配置文件参数的设置说明
- [WCF]配置文件中Certificate 的encodeValue怎么设置?
- WCF配置文件设置
- WCF之剑走偏锋-建立无配置文件的WCF项目
- WCF配置文件注释
- 路由器的修改特权密码、还原出厂设置、备份配置文件和升级操作系统实际操作
- 2009年7月小记(WCF限流行为, 网站性能设置, 序列化的性能, 读取内嵌资源文件, WMI, declarative, XML声明, 相互转换)
- idea中properties配置文件 注释显示中文设置
- WCF(二) 使用配置文件实现WCF应用程序
- WCF 服务器CONFIG文件(用服务配置编辑器编写)
- IIS6配置上传文件限制 metabase.xml设置
- wcf第2步之服务端标准配置文件
- 手动配置WCF宿主的.config文件遇到的几种错误
- asp.net2.0成员.角色.配置文件设置
- Spring-boot与maven多环境配置文件设置
- 只有在配置文件或 Page 指令中将 enableSessionState 设置为 true 时,才能使用会话状态。还请确保在应用程序配置的 // 节中包括 System.Web.SessionStateMod 或自定义会话状态模块 -
- LINUX基本配置文件 设置设置IP、网关等
- java IO 使用Properties设置键值对配置信息 写入文件和从文件中读取
- MySql5.7 配置文件 my.cnf 设置