大家知道,WCF开发工具可以帮助开发人员打造一款跨平台的安全性极高的解决方案。那么,他的安全机制是如何得到保障的呢?在这里,我们首先来了解一下在WCF安全配置中,出现的一些问题,先将问题总结如下,希望能够对大家祈祷一个研究的作用。
今天重新运行上一个任务的WCF服务,部署到本地调用发现报如下WCF安全配置错误:
- {"The caller was not authenticated by the service."}
The request for security token could not be satisfied because authentication failed,
问了一哥们才发现原来也碰到过这个WCF安全配置的问题,居然再次跌倒在这,所以匆忙记录一下
- < system.serviceModel>
- < services>
- < service name="*.SearchingService" behaviorConfiguration=
"*.SearchingServiceBehavior">- < !-- Service Endpoints -->
- < endpoint address="" binding="wsHttpBinding" bindingConfiguration=
"wsHttpBindingConfiguration" contract="*.ISearchingService">- < /endpoint>
- < /service>
- < /services>
- < bindings>
- < wsHttpBinding>
- < binding name="wsHttpBindingConfiguration">
- < security mode="None" />
- < /binding>
- < /wsHttpBinding>
- < /bindings>
- < behaviors>
- < serviceBehaviors>
- < behavior name="*.SearchingServiceBehavior">
- < !-- To avoid disclosing metadata information, set the value
below to false and remove the metadata endpoint above before deployment -->- < serviceMetadata httpGetEnabled="true" />
- < !-- 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 -->- < serviceDebug includeExceptionDetailInFaults="true" />
- < /behavior>
- < /serviceBehaviors>
- < /behaviors>
- < /system.serviceModel>
以上就是WCF安全配置时出现的问题,记录下来方便大家探讨。
【编辑推荐】