1

我正在使用运行 iis 7.5 的 Windows Server 2008 r2。我的 WCF 服务在框架 4.0 上运行。运行集成管道的 32 位应用程序。

服务位于启用匿名和 Windows 身份验证的虚拟目录中。我的配置如下:

<system.serviceModel>
<bindings>
  <basicHttpBinding>
    <binding name="MyBinding">
      <security mode="TransportCredentialOnly">
        <transport clientCredentialType="Windows" />
      </security>
    </binding>
  </basicHttpBinding>
</bindings>
<services>
  <service name="MyWebservice.MyService" behaviorConfiguration="MyWebservice.MyServiceBehavior">
    <!-- Service Endpoints -->
    <endpoint address="" binding="basicHttpBinding" bindingConfiguration="MyBinding" contract="MyWebservice.IMyService" />
    <endpoint address="mex" binding="basicHttpBinding" bindingConfiguration="MyBinding" contract="IMetadataExchange" />
  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="MyWebservice.MyServiceBehavior">
      <!-- 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>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>

当我从域上的帐户连接到 WCF 测试客户端时,我收到以下异常:

HTTP 请求未经客户端身份验证方案“协商”的授权。从服务器收到的身份验证标头是“协商”。

这个错误非常没有帮助。谁能指出我的方式错误?

4

1 回答 1

1

重新启动修复了错误。我什么时候才能学习,使用 Windows...当事情不再有意义时,重新启动。

于 2013-10-04T02:08:42.757 回答