本文介绍了WCF错误:呼叫者不是由服务认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

我想从测试我的客户端的控制台应用程序访问我的WCF服务的服务器上。我收到以下错误:

I am trying to access my WCF service on a server from my client console application for testing. I am getting the following error:

调用者没有被验证  服务

我使用的wsHttpBinding 。我不知道是什么样的身份验证的服务期待?

I am using wsHttpBinding. I'm not sure what kind of authentication the service is expecting?

                                                  
                      
    



<behaviors>
  <serviceBehaviors>
    <behavior name="MyTrakerService.MyTrakerServiceBehavior">
      <!-- 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="false"/>
    </behavior>
  </serviceBehaviors>
</behaviors>

更新它的工作原理,如果我改变我的结合&LT;终点basicHttpBinding的... /&GT; (从的wsHttpBinding)在IIS 7.0托管,Windows 2008的服务器

UpdateIt works if I change my binding to <endpoint "basicHttpBinding" ... /> (from wsHttpBinding)on the IIS 7.0 hosted, windows 2008 server

推荐答案

如果您使用basicHttpBinding的,配置端点安全性为无和运输clientCredintialType为无。

If you use basicHttpBinding, configure the endpoint security to "None" and transport clientCredintialType to "None."

<bindings>
    <basicHttpBinding>
        <binding name="MyBasicHttpBinding">
            <security mode="None">
                <transport clientCredentialType="None" />
            </security>
        </binding>
    </basicHttpBinding>
</bindings>
<services>
    <service behaviorConfiguration="MyServiceBehavior" name="MyService">
        <endpoint
            binding="basicHttpBinding"
            bindingConfiguration="MyBasicHttpBinding"
            name="basicEndPoint"
            contract="IMyService"
        />
</service>

此外,确保目录身份验证方法在IIS中启用匿名访问

Also, make sure the directory Authentication Methods in IIS to Enable Anonymous access

这篇关于WCF错误:呼叫者不是由服务认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-07 02:54