アプリケーションサーバーでtcpバインディングを使用してWindowsサービスとしてホストされているWCFサービスがあります。接続を試みている別の Web サーバーでホストされている ASP.NET Web アプリケーションがあります。どちらのサーバーも Windows 2008 R2 マシンです。
ASP.NET Web アプリケーションのアプリケーション プールは、ApplicationPoolIdentity をユーザーとして使用するように設定されています。Windows マシンから WCF サービスに接続しようとすると、次のエラーが発生します。
Source Exception: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:09.9980000'. ---> System.IO.IOException: The read operation failed, see inner exception. ---> System.ServiceModel.CommunicationException: The socket connection was aborted. This could be caused by an error processing your message or a receive timeout being exceeded by the remote host, or an underlying network resource issue. Local socket timeout was '00:00:09.9980000'. ---> System.Net.Sockets.SocketException: An existing connection was forcibly closed by the remote host
at System.ServiceModel.Channels.SocketConnection.ReadCore(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, Boolean closing)
ただし、アプリケーション プールのユーザーを Network Service に変更すると、エラーなしで接続されます。
私の質問は 2 つあります。ApplicationPoolIdentity の使用が機能しない理由を誰かが知っていますか?それは何らかの構成の問題ですか? また、アプリケーション プールをネットワーク サービス アカウントで実行することの欠点は何でしょうか? ApplicationPoolIdentity の権限が少なく、安全性が高く、ベスト プラクティスと見なされていることはわかっています。