-1
var client = new CommonClient()
XElement exceptionDates = XElement
    .Parse(client.ExceptionDatesUpdateControl("status").OuterXml);

通話時:

client.ExceptionDatesUpdateControl("status")

次のエラーがスローされます。

SecurityNegotiationException: SSPI の呼び出しに失敗しました

原因は何ですか?

追加情報:

Web.config:

<system.serviceModel>
    <bindings>
      <netNamedPipeBinding>
        <binding name="NetNamedPipeBinding_ICommon" />
      </netNamedPipeBinding>
    </bindings>
    <client>      
      <endpoint address="net.pipe://localhost/service/common" binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_ICommon" contract="Service.Common.ICommon" name="NetNamedPipeBinding_ICommon">            
      </endpoint>
    </client>

App.config:

<services>
      <service name="PROJ.Service.CommonService" behaviorConfiguration="CommonServiceBehavior">
        <host>
          <baseAddresses>            
            <add baseAddress="net.pipe://localhost/service/common"/>
          </baseAddresses>
        </host>            
        <endpoint
             address="net.pipe://localhost/service/common"
             binding="netNamedPipeBinding"
             bindingConfiguration="pipeCommonServiceBinding"
             contract="PROJ.Service.ICommon"
             />
4

2 に答える 2

0

この例外は、次の場合に発生する可能性があります。

• 初期セキュリティ コンテキストのネゴシエーション中。正確なエラーは、使用されているネゴシエーション テクノロジ (Simple and Protected GSS-API Negotiation (SPNEGO) または TLSNEGO) によって異なります。詳細については、セキュリティ プロトコルを参照してください。

• 初期セキュリティ コンテキストの上にセキュリティ セッションを確立するとき。

• 既存のセキュリティ セッションのキー更新中。

セキュリティ ネゴシエーション エラーは、Spnego/Sslnego セキュリティ プロトコルの一部として、または SecureConversation プロトコルの一部として発生する可能性があります。

ソース: MSDN

于 2013-11-13T10:27:43.007 に答える
0

私は答えを見つけました。
さらに詳しく調べてみると、「Security.Authentication.AuthenticationException」という別の例外がありました。

構成ファイルで次の行をコメントすると、消えました。

 <!--identity>
      <servicePrincipalName value="host/..." />
    </identity-->
于 2013-11-19T05:30:37.073 に答える