次のエラーがランダムに発生します。動作することもありますが、失敗することもあります。
セッション状態サーバーにセッション状態要求を行うことができません。ASP.NET State サービスが開始されていること、およびクライアントとサーバーのポートが同じであることを確認してください。サーバーがリモート マシン上にある場合は、HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection の値を確認して、サーバーがリモート リクエストを受け入れることを確認してください。サーバーがローカル マシン上にあり、前述のレジストリ値が存在しないか 0 に設定されている場合、状態サーバー接続文字列はサーバー名として「localhost」または「127.0.0.1」を使用する必要があります。
Web.config の私の sessionState 構成は次のとおりです。
<sessionState cookieless="UseCookies" mode="StateServer" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" stateConnectionString="tcpip=127.0.0.1:42424" timeout="20" />
ASP.NET 状態サーバーが稼働中であることを再確認しました。また、ASP.NET ステート サーバーがポート 42424 で実行されていることも確認しました。実際、動作することもあります。私の IIS アプリケーション プールは、.NET 4 統合パイプラインです。
Microsoft のこの記事も確認しました。これは、stateNetworkTimeout を増やすことを提案しています。しかし、サーバーの負荷が高くないため、私にとっては良い解決策ではないようです。
イベント ビューアーに移動すると、次の警告が表示されます。
Event code: 3009
Event message: Unable to make the session state request to the session state server. Details: last phase='Sending request to the state server', error code=0x80072749, size of outgoing data=0
Event time: 8/27/2014 4:38:04 PM
Event time (UTC): 8/27/2014 2:38:04 PM
Event ID: 848eadc753cf4e99aee72824d1d7fc85
Event sequence: 239
Event occurrence: 12
Event detail code: 50016
Application information:
Application domain: /LM/W3SVC/2/ROOT/download-7-130536222982810000
Trust level: Full
Application Virtual Path: /download
Application Path: C:\inetpub\vhosts\plasticscm.com\httpdocs\download\
Machine name: main
Process information:
Process ID: 4124
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: HttpException
Exception message: Unable to make the session state request to the session state server. Please ensure that the ASP.NET State service is started and that the client and server ports are the same. If the server is on a remote machine, please ensure that it accepts remote requests by checking the value of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection. If the server is on the local machine, and if the before mentioned registry value does not exist or is set to 0, then the state server connection string must use either 'localhost' or '127.0.0.1' as the server name.
これをさらに調査するにはどうすればよいですか?