2009-03-26 10 views
0

バインディング "wsDualHttpBinding"でWCFサービスをホストしようとしています。クライアントとサービス(IISでホストされている)を同じマシンから実行すると、正常に動作します。しかし、別のマシンでサービスをホストすると、クライアントはサービスに登録できません。次のエラーが[System.ServiceModel.Security.SecurityNegotiationEception] 発呼者が サービスによって認証されなかった...WCFクライアントが別のマシンで実行されているサービスとのセキュリティアクセスをネゴシエートできません

を来ています。また、内部例外:認証 が失敗したため、 セキュリティトークンの要求には を満たすことができませんでした。

別のワークグループ内の別のマシンから次のエラーを実行しようとしている「(0時00分00秒)クライアント 設定された時間内 セキュリティネゴシエーションを完了することができません」

が表示されます

IIS6.0では、統合認証が無効になり、匿名アクセスが許可されました。

私のサービスのweb.configは、次のとおりです。App.configファイルは、以下の


<system.serviceModel> 
    <diagnostics> 
     <messageLogging logMalformedMessages="true" logMessagesAtServiceLevel="true" logMessagesAtTransportLevel="true"/> 
    </diagnostics> 
    <bindings> 
     <wsDualHttpBinding> 
      <binding name="StatTickerHttpBinding" bypassProxyOnLocal="false" useDefaultWebProxy="true" receiveTimeout="23:59:59"> 
       <reliableSession ordered="true" inactivityTimeout="00:30:00"/> 
      </binding> 
     </wsDualHttpBinding> 
    </bindings> 
    <services> 
     <service name="StatTickerService" behaviorConfiguration="ServiceBehavior"> 
      <!-- Service Endpoints --> 
      <endpoint address="" binding="wsDualHttpBinding" bindingConfiguration="StatTickerHttpBinding" contract="IBroadCastService"> 
       <!-- 
       Upon deployment, the following identity element should be removed or replaced to reflect the 
       identity under which the deployed service runs. If removed, WCF will infer an appropriate identity 
       automatically. 

        <identity> 
         <dns value="localhost"/> 
        </identity> --> 
      </endpoint> 
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/> 
     </service> 
    </services> 
    <behaviors> 
     <serviceBehaviors> 
      <behavior name="ServiceBehavior"> 
       <!-- 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> 
</system.serviceModel> 

私のクライアント...


<system.serviceModel> 
    <bindings> 
     <wsDualHttpBinding> 
      <binding name="WSDualHttpBinding_StatTickerBroadcastService" 
       closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" 
       bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" 
       maxBufferPoolSize="524288" maxReceivedMessageSize="65536" 
       messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true"> 
       <readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384" 
        maxBytesPerRead="4096" maxNameTableCharCount="16384"/> 
       <reliableSession ordered="true" inactivityTimeout="00:30:00"/> 
       <security mode="Message"> 
        <message clientCredentialType="Windows" negotiateServiceCredential="true" algorithmSuite="Default"/> 
       </security> 
      </binding> 
     </wsDualHttpBinding> 
    </bindings> 
    <client> 
     <endpoint address="http://192.168.100.77/TPS.StatTicker.WCFservice/Service.svc" binding="wsDualHttpBinding" 
      bindingConfiguration="WSDualHttpBinding_StatTickerBroadcastService" 
      contract="BroadcastGateway.StatTickerBroadcastService" 
      name="WSDualHttpBinding_StatTickerBroadcastService"> 
      <identity> 
       <servicePrincipalName value="host/192.168.100.77"/> 
      </identity> 
     </endpoint> 
    </client> 
</system.serviceModel> 

クライアント側の設定svcutilを使って行います。

私は過去4日間googleで提供されたすべてのソリューションを検索して試しましたが、運はありませんでした。緊急に手伝ってください。

答えて

0

サーバーのweb.configに「none」のセキュリティを指定する必要があると思います。それ以外の場合は、デフォルトでは認証メカニズムを主張します。

1

問題が分かっている場合は、委任に問題があるようです。ここで

は、私はあなたがやろうとしていると思うものです:

  • ユーザーは
  • ユーザーがWindows認証(ケルベロス)で認証するWebサービスに接続する
  • Webサーバーがユーザー
  • Webサーバは、バックエンドに接続する偽装しますWCF経由で
  • Webサーバーは、ユーザーの資格情報(ケルベロス)を使用してバックエンドで認証します
  • バックエンドは資格情報を受け取り、データを提供します

あなたのバックエンドは、委任と呼ばれるWebサーバーを信頼する必要があります。これはドメインによって制御され、自由に与えられるわけではありません。

両方のマシンが同じドメイン上にある場合、ドメインコントローラは、Webサーバーをユーザーに委任できるように構成する必要があります。これがなければ、ネットワーク上のどのマシンも、ユーザーのために行動するWebサーバーを信頼することはありません。これがすべて同じマシン上で行われる場合は、独自の委任を行います。

両方のマシンがワークグループ内にある場合、私はあなたが何をするのか分かりません。

+0

を、これが最も可能性の高いソリューションです - 私は信じています。 –

0

このお試しください:クライアントとサービスがリモートで離れている場合は

<identity> 
    <servicePrincipalName value=""/> 
</identity> 
+1

それは動作しません! –

関連する問題