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

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

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

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

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

以上就是我们为大家介绍的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-26 13:21:42

WCF通道形状

2010-02-23 11:22:15

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-26 09:50:57

WCF传输安全机制

2010-02-24 16:17:09

WCF获取客户端IP

2010-02-23 09:34:15

WCF重载

2010-02-22 16:09:33

WCF宿主

2010-02-22 10:01:11

WCF消息处理

2010-02-26 13:26:55

WCF消息编码器

2009-11-09 11:15:06

WCF消息队列

2010-02-22 15:27:05

WCF数据契约

2009-12-21 13:27:45

WCF服务配置信息

2010-03-05 11:04:00

C调用Python函数

2010-02-22 16:26:47

WCF传输数据
点赞
收藏

51CTO技术栈公众号