2013-10-16 22 views
10

State Serverセッションを使用しようとしています。セッション状態サーバーにセッション状態要求を行うことができません。

私は次の私のセッション状態を変更した:

<sessionState mode="StateServer" stateConnectionString="tcpip=127.0.0.1:42424" cookieless="false" timeout="20" /> 

ローカルホストからの私のウェブサイトを実行し、すべてが正常に動作します。

しかし、私は私のウェブサイトを公開し、オンラインにそれを実行しようとすると、私は次のエラーを取得する:

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.

ウェブサイトは、エラーをresarchingた後、私はそれがASP.NETので、できることを見出し、Afrihostサーバ上でホストされています状態サービスが開始されていません。 Afrihostサーバーがこのサービスを実行しているかどうか、またはリモートから起動する方法を確認できますか?

また、私はIPアドレス127.0.0.1がローカルホスト用であることを知っていますが、Webサーバーにアプリケーションを公開しているため、そのマシンにローカルになります。

+0

サーバーでRDP接続できますか?その場合は、サービスが正しく開始されていることを確認してください(services.msc内)。正しく起動しない場合は、Windowsイベントログ – CharlesAD

+0

@CharlesADを確認してください。Afrihostは、南アフリカのウェブサイト。 – Pomster

答えて

23

このエラーメッセージは、ASP.NET状態サービスが実行されていないことを意味します。

接続文字列は常にstateConnectionString="tcpip=127.0.0.1:42424"である必要があります。サイトがホストされているローカルコンピュータはどこにでもあります。

Afrihostに連絡してサービスを再開するように頼んだら、すべて正常に動作するようになりました。

enter image description here

+2

はい、それは正解です。上記の提案に従ってください。 :) –

+0

また、[スタートアップの種類]を[自動]に設定して、サーバーを再起動するたびに変更する必要はありません。 – Pomster

+0

私は同じエラーがあり、サービスを開始できません。どのように解決できるか –

関連する問題