WCF禁用安全配置指导手册

开发 开发工具
WCF禁用安全配置对于初学者来说可能遇到的次数并不是太多,所以对此不太了解。通过这篇文章介绍的内容,大家应该可以初步掌握这一技巧。

WCF中具有安全配置。不过,在实际使用中我们有时会碰到需要关闭这一安全配置的环境。今天我们就来为大家介绍一下有关WCF禁用安全配置的相关知识。#t#

时不时会用到这个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 includeException
    DetailInFaults
    ="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禁用安全配置相关技巧讲解。

责任编辑:曹凯 来源: 博客园
相关推荐

2010-02-25 13:40:17

WCF禁用安全配置

2010-06-03 14:55:59

Hadoop配置

2010-09-26 10:02:09

JVM优化配置

2010-06-07 18:12:39

mrtg 安装

2009-12-21 10:44:32

2010-01-05 11:26:27

.net Framew

2010-01-04 16:17:50

Silverlight

2009-12-18 15:49:05

Ruby Rmagic

2010-07-15 09:10:08

Perl函数手册

2010-06-04 17:34:13

Hadoop0.20.

2010-06-04 17:21:48

2014-12-24 10:24:55

Java

2010-02-24 09:28:37

WCF安全配置

2009-12-30 17:14:03

Silverlight

2009-11-06 14:08:06

WCF行为扩展

2010-10-08 14:31:46

Javascriptsplit函数

2010-08-04 11:23:15

Flex字符串

2010-05-19 18:03:07

2010-05-19 18:26:28

SVN服务器安装

2011-03-03 11:19:43

SQL server
点赞
收藏

51CTO技术栈公众号