簡體   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