WCF安全配置相关解决方案分析

开发 开发工具
当我们在进行WCF安全配置的时候,会遇到一种比较特殊的问题,那么在这里我们就将这一问题记录下来,以方便大家将来的学习。

大家知道,WCF开发工具可以帮助开发人员打造一款跨平台的安全性极高的解决方案。那么,他的安全机制是如何得到保障的呢?在这里,我们首先来了解一下在WCF安全配置中,出现的一些问题,先将问题总结如下,希望能够对大家祈祷一个研究的作用。

今天重新运行上一个任务的WCF服务,部署到本地调用发现报如下WCF安全配置错误:

  1. {"The caller was not authenticated by the service."} 

The request for security token could not be satisfied because authentication failed,

问了一哥们才发现原来也碰到过这个WCF安全配置的问题,居然再次跌倒在这,所以匆忙记录一下

  1. < system.serviceModel> 
  2. < services> 
  3. < service name="*.SearchingService" behaviorConfiguration=
    "*.SearchingServiceBehavior"> 
  4. < !-- Service Endpoints --> 
  5. < endpoint address="" binding="wsHttpBinding" bindingConfiguration=
    "wsHttpBindingConfiguration" contract="*.ISearchingService"> 
  6. < /endpoint> 
  7. < /service> 
  8. < /services>   
  9. < bindings> 
  10. < wsHttpBinding> 
  11. < binding name="wsHttpBindingConfiguration"> 
  12. < security mode="None" /> 
  13. < /binding> 
  14. < /wsHttpBinding> 
  15. < /bindings> 
  16. < behaviors> 
  17. < serviceBehaviors> 
  18. < behavior name="*.SearchingServiceBehavior"> 
  19. < !-- To avoid disclosing metadata information, set the value 
    below to false and remove the metadata endpoint above before deployment --
    > 
  20. < serviceMetadata httpGetEnabled="true" /> 
  21. < !-- To receive exception details in faults for debugging purposes, 
    set the value below to true. Set to false before deployment to avoid 
    disclosing exception information --
    > 
  22. < serviceDebug includeExceptionDetailInFaults="true" /> 
  23. < /behavior> 
  24. < /serviceBehaviors> 
  25. < /behaviors> 
  26. < /system.serviceModel> 

以上就是WCF安全配置时出现的问题,记录下来方便大家探讨。

【编辑推荐】

  1. WCF Adapter轻松管理消息通信
  2. 多种WCF绑定类型应用情况分析
  3. WCF异常现象两种特殊情况具体分析
  4. WSIT连接WCF正确操作方法
  5. WCF双向通信相关概念正确理解
责任编辑:曹凯 来源: 博客园
相关推荐

2010-02-23 17:49:56

WCF传输大数据

2010-02-24 10:55:01

WCF跨域访问

2010-02-23 14:56:18

WCF Bug

2010-02-22 10:29:11

WCF上传文件

2010-02-25 13:40:17

WCF禁用安全配置

2010-02-24 14:05:08

WCF openati

2010-12-21 17:39:59

2010-12-24 13:05:22

2009-11-06 15:25:25

WCF异常

2009-12-07 15:50:27

WCF文件

2010-02-26 15:46:48

Silverlight

2020-04-20 09:37:41

移动边缘计算云计算安全

2009-03-25 09:43:51

开发自定义托管WCF

2010-12-21 17:36:12

2011-01-21 09:50:31

2013-03-01 16:45:27

2009-12-08 16:42:48

WCF Service

2009-12-08 15:19:58

WCF大数据量

2010-02-25 14:53:44

WCF调用服务异常

2017-08-01 17:01:49

IOT梯联网AWS
点赞
收藏

51CTO技术栈公众号