ASP.NET Session Variables

pvg1975
pvg1975 used Ask the Experts™
on
Hello all,

I have the session variables configured as follows on my web.config:

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

I deployed another server at 192.168.0.4 and I changed the above line by this:

    <sessionState mode="StateServer" stateConnectionString="tcpip=192.168.0.4:42424" cookieless="false" timeout="120" />

But when browsing the application, I get the following error:

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.

I already set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection to 1 but still get the same error.

Any suggestions?

Thanks!
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi!

Is state server (192.168.0.4) reachable from server where IIS is located? Can you ping it?
There can be a number of reason like warefall or antivirus software blocking the connection on 42424 port.
I would advise to use some sniffer software (like wireshark) to see if state server receives packets from iis. Then you can find if problem is on iis side (can't send packet) or on state server side (can't receive packet).
BTW, I guess you need to set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\aspnet_state\Parameters\AllowRemoteConnection to 1 on both iis server and state server.

Author

Commented:
Thanks Johny, the ASP.NET State Service was down :(

BTW, I miss your cartoons :P

Paula
:)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial