繁体   English   中英

WCF wsHttpBinding安全性错误

[英]WCF wsHttpBinding Security Error

我有一个WCF托管在Windows Service中,并以用户域帐户运行。

我在域中的所有客户端(控制台应用程序或Web应用程序)都运行良好。

我有一个控制台应用程序不在无法正常工作的域中。

这是错误:

Exception non gérée : System.ServiceModel.Security.SecurityNegotiationException:
L'appelant n'a pas été authentifié par le service. ---> System.ServiceModel.Fau
ltException: The request for security token could not be satisfied because authe
ntication failed.

这是WCF服务器配置:

      <wsHttpBinding>
        <binding name="TransactionalBind" transactionFlow="true"/>
      </wsHttpBinding>

[...]

    <endpoint address="http://machine.domain.fr:1083/MyService/"
              binding="wsHttpBinding"
              bindingConfiguration="TransactionalBind"
              contract="MyService.IMyService"/>
[...]

    <behavior name="MyBahavior">
      <serviceMetadata httpGetEnabled="True"/>
      <serviceDebug includeExceptionDetailInFaults="True" />
      <dataContractSerializer maxItemsInObjectGraph="2147483647" />
    </behavior>

这是我的客户端配置:

        <wsHttpBinding>
            <binding name="WSHttpBinding_IMyService" closeTimeout="00:01:00"
                openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
                bypassProxyOnLocal="false" transactionFlow="true" hostNameComparisonMode="StrongWildcard"
                maxBufferPoolSize="524288" maxReceivedMessageSize="65536"
                messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"
                allowCookies="false">
                <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
                    maxBytesPerRead="4096" maxNameTableCharCount="16384" />
                <reliableSession ordered="true" inactivityTimeout="00:10:00"
                    enabled="false" />
                <security mode="Message">
                    <transport clientCredentialType="Windows" proxyCredentialType="None"
                        realm="" />
                    <message clientCredentialType="Windows" negotiateServiceCredential="true"
                        algorithmSuite="Default" />
                </security>
            </binding>
        </wsHttpBinding>
[...]

        <client>
            <endpoint address="http://machine.domain.fr:1083/MyService/"
                binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_IMyService"
                contract="wsArchi.IMyService" name="WSHttpBinding_IMyService">
            </endpoint>
        </client>

你能帮我吗 ?

非常感谢

尝试使用BasicHttpBinding ...当我使用WSHttpBinding时遇到问题。...BasicHttpBinding解决了我的问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM