##WCF配置
2016-01-15 09:45
405 查看
最近项目使用wcf技术开发,觉得应该将配置文件记录下来:
服务器端配置
客户端配置文件
服务器端配置
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <services> <service behaviorConfiguration="MyServiceBehavior" name="Database.OracleDatabaseService"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="binding" contract="Database.IDatabaseService"/> <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:16015/Service/Database"/> </baseAddresses> </host> </service> <service behaviorConfiguration="MyServiceBehavior" name="Machine.DownloadService"> <endpoint address="" binding="netTcpBinding" bindingConfiguration="binding" contract="Machine.IDownloadService"/> <endpoint address="mex" binding="mexTcpBinding" contract="IMetadataExchange"/> <host> <baseAddresses> <add baseAddress="net.tcp://localhost:16016/Service/Download"/> </baseAddresses> </host> </service> </services> <behaviors> <serviceBehaviors> <behavior name="MyServiceBehavior"> <dataContractSerializer maxItemsInObjectGraph="2147483647"/> <serviceMetadata/> <serviceDebug includeExceptionDetailInFaults="True"/> </behavior> </serviceBehaviors> </behaviors> <bindings> <netTcpBinding> <binding name="binding" sendTimeout="00:10:00" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <security mode="None"> </security> </binding> </netTcpBinding> </bindings> </system.serviceModel> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/> </startup> </configuration>
客户端配置文件
<?xml version="1.0" encoding="utf-8" ?> <configuration> <system.serviceModel> <behaviors> <endpointBehaviors> <behavior name="ServiceBehavior"> <dataContractSerializer maxItemsInObjectGraph="2147483647" /> </behavior> </endpointBehaviors> </behaviors> <bindings> <netTcpBinding> <binding name="ServiceBinding" sendTimeout="00:03:00" maxBufferPoolSize="2147483647" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647"> <security mode="None" /> </binding> </netTcpBinding> </bindings> <client> <endpoint address="net.tcp://localhost:16015/Service/Database" name="Database" binding="netTcpBinding" bindingConfiguration="ServiceBinding" contract="Ehl.ATMOS.TCS.JR.DB.DbBusiness.IDatabaseService" /> <endpoint address="net.tcp://localhost:16016/Service/Download" name="Download" binding="netTcpBinding" bindingConfiguration="ServiceBinding" contract="Ehl.ATMOS.TCS.JR.InteracteOper.ServiceClients.IDownloadService" /> </client> </system.serviceModel> <startup> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" /> </startup> </configuration>
相关文章推荐
- 解析Silverlight调用WCF/Rest异常的解决方法
- 使用C#实现读取系统配置文件的代码实例讲解
- Powershell Profiles配置文件的存放位置介绍
- PowerShell入门教程之创建和使用配置文件实例
- SERV-U 的配置文件详解
- php.ini 配置文件的深入解析
- redis2.8配置文件中文翻译版
- PHP配置文件php.ini中打开错误报告的设置方法
- jQuery Ajax调用WCF服务详细教程
- jQuery ajax调用WCF服务实例
- C#中读取App.config配置文件代码实例
- c++实现逐行读取配置文件写入内存的示例
- 关于session在PHP5的配置文件中的详细设置参数说明
- MySQL 配置文件my.cnf 例子最详细翻译
- apache 配置文件解说
- Android 读取Properties配置文件的小例子
- PHP 配置文件中open_basedir选项作用
- .net 读取非标准配置文件的小例子
- C# 一个WCF简单实例
- APACHE 配置文件中文版 httpd.conf FOR Apache 2.2.13