Windows 2003 Serverで単純なWCFサービスをホストする際に問題が発生しています。私はnetTcpBindingを使用しており、デフォルトではWindows認証を使用しています。Windows 2003 ServerのWCFサービスのセキュリティ例外
クライアントは別のサーバーで実行されており、簡単な情報をサービスに戻すためにWindowsシステムプロセスによって呼び出されます。セキュリティコンテキストはをサービスに戻す必要があり、クライアントIDはNT AUTHORITY \ SYSTEMにする必要があります。
これはすべて、Windows 2008 Server(およびWindows 7 FWIW)上でのみ有効です。しかし、この同じ構成は、Windows上で障害が発生した2003年のサーバR2、SP 2.私は、トレースWCFになって、サービス側でこの例外を見た:
SecurityTokenValidationException:サービスは、あなたがそう匿名
にログオンすることはできません。 Windows 2003のように見えますが、セキュリティコンテキストが通過していません。
私はSOとこれに関連してMS Supportから話を聞いたことがありますが、ほとんどはIISの問題を中心にしているようです。このサービスはWindowsサービスで自己ホストされ、IISは関与しません。
編集:クライアントがWindowsシステムプロセスによって呼び出されたときに、ONLYが問題になることが判明しました。私は対話的にサービスクライアントを実行することができます(それは単なるコンソールアプリケーションです)、うまく動作します。
アイデア?ここで
は、ホストWCFの設定です:
<service name="MyService">
<endpoint
address=""
binding="netTcpBinding"
bindingConfiguration=""
contract="IMyService">
<identity>
<dns value="localhost" />
</identity>
</endpoint>
<host>
<baseAddresses>
<add baseAddress="net.tcp://TheAppServer:8732/MyService/" />
</baseAddresses>
</host>
</service>
、ここでは、クライアントの設定です:
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding
name="NetTcpBinding_IMyService"
transactionFlow="false"
transferMode="Buffered"
transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard">
<reliableSession
ordered="true"
inactivityTimeout="00:10:00"
enabled="false"/>
<security mode="Transport">
<transport
clientCredentialType="Windows"
protectionLevel="EncryptAndSign"/>
<message
clientCredentialType="Windows"/>
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint
address="net.tcp://TheAppServer:8732/MyService/"
binding="netTcpBinding"
bindingConfiguration="NetTcpBinding_IMyService"
contract="IMyService"
name="NetTcpBinding_IMyService">
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
</client>
サーバー側で同じバインディング構成を再作成し、サーバー側のエンドポイントがそのバインディング構成(トランスポートセキュリティ付き)を使用していることを確認する必要があると考えています –
サーバー側で同じバインディングを作成しても、あなたが挙げる例外によれば、私はクライアントがサーバー側に資格情報を送信しなかったと思いますが、これを確認できますか? – Jack
重要な編集を追加しました。この設定は、クライアントを対話的にデスクトップから実行するとうまく動作します – Mekon