.net 4.0 新特征 WCF无SVC服务配置方式
2011-08-16 10:11
281 查看
宿主采用IIS7.0,其web.config的配置信息如下
使用WCF配置工具的一般步骤
<?xml version="1.0" encoding="utf-8"?> <configuration> <system.web> <compilation debug="true" targetFramework="4.0" /> </system.web> <system.serviceModel> <bindings> <basicHttpBinding> <binding name="NewBinding0" /> </basicHttpBinding> </bindings> <services> <service name="Services.DemoServer"> <endpoint address="" binding="basicHttpBinding" bindingConfiguration="NewBinding0" contract="Services.IDemoServer" /> </service> </services> <behaviors> <serviceBehaviors> <behavior> <!-- 为避免泄漏元数据信息,请在部署前将以下值设置为 false 并删除上面的元数据终结点 --> <serviceMetadata httpGetEnabled="true"/> <!-- 要接收故障异常详细信息以进行调试,请将以下值设置为 true。在部署前设置为 false 以避免泄漏异常信息 --> <serviceDebug includeExceptionDetailInFaults="false"/> </behavior> </serviceBehaviors> </behaviors> <!-- /////////////////////////////////以下是无.SVC核心配置部分//////////////////////////////////////////////// --> <serviceHostingEnvironment multipleSiteBindingsEnabled="true"> <serviceActivations> <!--可在wcf配置管理器中的 > 高级 > 宿主环境 > serviceActivations配置--> <add relativeAddress="dong/DemoServer.svc" service="Services.DemoServer" /> </serviceActivations> </serviceHostingEnvironment> <!-- //////////////////////////////////////////////////////////////////////////////////////////// --> </system.serviceModel> <system.webServer> <modules runAllManagedModulesForAllRequests="true"/> </system.webServer> </configuration>
使用WCF配置工具的一般步骤
相关文章推荐
- WCF步步为营(二):使用配置文件改变发布服务的方式
- WCF步步为营(三):使用配置文件改变使用服务的方式
- IIS7部署.NET 4.0 WCF服务提示"svc integrated" - "bad module"错误
- .net 4.0中wcf在iis7中的配置过程
- 记录:Web无引用无配置方式动态调用WCF服务
- 一步一个脚印学习WCF系列之WCF概要—WCF服务的创建与调用HelloWorld实例,通过配置文件方式(六)
- [WCF 4.0新特性] 标准终结点与无(.SVC)文件服务激活
- [.NET 4.0]从 Web浏览器存取 WCF数据服务 / WCF Data Services (附:PDF与范例下载)
- wcf 4.0 中Rest service 在iis host中不用.svc文件的配置
- 普通WCF应用程序使用SVC文件寄宿WF 4.0服务
- 编写WCF服务时右击配置文件无“Edit WCF Configuration”远程的解决办法
- IIS中配置REST服务svc文件支持的HTTP动作
- WCF服务在IIS发布时遇到的一些配置问题
- 2008年3月小记(设置Windows服务的依赖关系,配置MSMQ的访问权限,WCF的安全配置,删除重建网站,HttpWebRequest,一年中的周,在WCF中使用HttpContext,String.Join)
- WCF 4.0 进阶系列 – 第十四章 检测服务和路由消息(第一部分)
- 使用接口的方式调用远程服务 ------ 利用动态调用服务,实现.net下类似Dubbo的玩法。
- WCF服务配置总结
- WCF 服务文件 *.svc 部署到 IIS 步骤
- 配置 Tomcat 以服务方式自动运行
- 完全不使用配置文件构建和使用WCF服务