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双向通信相关概念正确理解
THE END