WCF禁用安全配置相关代码剖析

开发 开发工具
WCF禁用安全配置在实际编程中是一个比较常用到的操作技术。在这里我们就为大家总结了一下它的使用方法,方便大家使用。

在使用了WCF这样一款开发工具之后,我们会发现,它在安全性方面发挥了非常大的作用。不过在一定的环境中,我们又需要禁用安全性配置,那么这时我们应该如何操作呢?在这里就一起来了解一下WCF禁用安全配置的相关方法吧。

WCF禁用安全配置具体实现代码:

< ?xml version="1.0" encoding="utf-8" ?> 
< configuration> 
< system.web> 
< compilation debug="true" /> 
< /system.web> 
< system.serviceModel> 
< services> 
< service name="CertificateTest.Service.CalService"   
behaviorConfiguration="CalServiceBeConfig"> 
< host> 
< baseAddresses> 
< add baseAddress = "http://localhost:8888/" /> 
< /baseAddresses> 
< /host> 
< !--指定endpoint的bindingConfiguration属性--> 
< endpoint address ="CalService"   
binding="wsHttpBinding" 
contract="CertificateTest.Contract.ICalService" 
bindingConfiguration="noSecBinding"> 
< identity> 
< /identity> 
< /endpoint> 
< /service> 
< /services> 
< behaviors> 
< serviceBehaviors> 
< behavior name="CalServiceBeConfig" > 
< serviceMetadata httpGetEnabled="True"/> 
< serviceDebug includeExceptionDetailInFaults="False" /> 
< /behavior> 
< /serviceBehaviors> 
< /behaviors> 
< !--在binding这里禁用安全性--> 
< bindings> 
< wsHttpBinding> 
< binding name="noSecBinding"> 
< security mode="None">< /security> 
< /binding> 
< /wsHttpBinding> 
< /bindings> 
< /system.serviceModel> 
< /configuration> 
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.

以上就是我们为大家介绍的WCF禁用安全配置相关内容。

【编辑推荐】

  1. WCF tcpTrace实现功能浅析
  2. WCF单向协定基本创建步骤解析
  3. WCF返回自定义格式具体应用技巧详解
  4. WCF响应服务基本应用技巧分享
  5. WCF排队调用由NetMsmqBinding支持
责任编辑:曹凯 来源: 博客园
相关推荐

2009-12-22 11:14:38

WCF禁用安全配置

2010-02-24 09:28:37

WCF安全配置

2009-12-08 17:56:16

WCF配置

2010-02-23 11:22:15

WCF跟踪调试

2010-02-26 13:21:42

WCF通道形状

2010-02-24 15:42:03

WCF服务端安全

2010-02-25 13:54:48

WCF安全参数

2009-12-21 11:19:50

WCF配置文件

2009-12-28 08:54:58

ADO错误

2010-02-22 16:09:33

WCF宿主

2010-02-22 10:01:11

WCF消息处理

2010-02-23 09:34:15

WCF重载

2009-11-09 11:15:06

WCF消息队列

2010-02-22 15:27:05

WCF数据契约

2010-02-24 16:17:09

WCF获取客户端IP

2010-02-26 09:50:57

WCF传输安全机制

2010-02-26 13:26:55

WCF消息编码器

2009-12-21 13:27:45

WCF服务配置信息

2010-03-05 11:04:00

C调用Python函数

2009-11-06 09:14:14

WCF可靠性
点赞
收藏

51CTO技术栈公众号