您的位置:首页 > 其它

wcf访问出现的安全问题:the caller was not authenticated by the service.

2011-01-19 16:03 1141 查看
在本项目中使用的wcf技术,调用发布服务的服务时出现“the caller was not authenticated by the service.错误”,经过在网上搜索,终于找到了解决方法,现记录如下:

修改配置文件中的节点信息:

<service behaviorConfiguration="NewMedia.Portal.Service.Service1Behavior"
name="CRI.NewMedia.Portal.Service.Service1">
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="wsHttpBindingConfiguration" contract="CRI.NewMedia.Portal.Service.IService1">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>

<bindings>
<wsHttpBinding>
<binding name="wsHttpBindingConfiguration">
<security mode="None" />
</binding>
</wsHttpBinding>
</bindings>

<behavior name="NewMedia.Portal.Service.Service1Behavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>

注意修改红色字体就可以了。

本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/yanli0823/archive/2009/08/26/4481876.aspx
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐