Visual Studio 2005 - Unable to make the session state request to the session state server.

 Hi,

 I have recently been given a PC with Vista on it, and installed Visual Studio 2005 pro. I then moved a ASP.net web project from an XP machine to the Vista one.

 When I run the project from inside Visual Studio (debug mode) everything works fine on the front end of the website, but if I try and log in 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.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: 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.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[HttpException (0x80072749): 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.]
System.Web.SessionState.OutOfProcSessionStateStore.MakeRequest(StateProtocolVerb verb, String id, StateProtocolExclusive exclusiveAccess, Int32 extraFlags, Int32 timeout, Int32 lockCookie, Byte[] buf, Int32 cb, Int32 networkTimeout, SessionNDMakeRequestResults& results) +1582
System.Web.SessionState.OutOfProcSessionStateStore.SetAndReleaseItemExclusive(HttpContext context, String id, SessionStateStoreData item, Object lockId, Boolean newItem) +192
System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +476
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
 

The registry key given in the error does not exist in my registrey, and the ip address for the state server is set to 127.0.0.1 in my web.config file. I've seen posts on other forums about this, but none of the solutions given work for me.

Any help would be much appriciated,

Robin 

0
robin
5/27/2008 2:34:35 PM
asp.net.state-management 8807 articles. 0 followers. Follow

5 Replies
1420 Views

Similar Articles

[PageSpeed] 24
Get it on Google Play
Get it on Apple App Store

The StateService is not set to start by default because the default mode for session is in-process.  If you are configured to use the StateServer service, then you need to change that service to start automatically.

This is done from the Services section of your systems Control Panel


Mike Banavige
~~~~~~~~~~~~
Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/
0
mbanavige
5/27/2008 2:38:10 PM

 Thanks for your help.

Unfortunately I cannot find the State Server listed anywhere in the services control panel. Is it called something else (I have looked for ASP state server as well). Is this something that doesn't comes as standard with Vista Business and I need to get from somewhere and install?

 I'm sorry to sound so uninformed but I usually develop on a LAMP stack, all this Windows stuff is new to me.
 

0
robin
5/27/2008 3:07:28 PM

Hi Robin,

The name of ASP.NET state service is “ASP.NET State Service”. If you cannot find it in Windows Service, pleaes make sure you have installed ASP.NET properly, you may try to reinstall ASP.NET 2.0 via exectuing the following commands:

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –u
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis –i

In additiion, there is a known issue of installing ASP.NET state service with the 32-bit ASP.NET 2.0 on 64-bit computer. You can see detailed information on the following link. Hope it is helpful to you.

The ASP.NET state service (Aspnet_state.exe) is not installed when you install the 32-bit version of ASP.NET 2.0 on a 64-bit computer
http://support.microsoft.com/kb/911720

 


Sincerely,
Benson Yu
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
0
Benson
6/2/2008 3:55:02 AM
Hello. I was browsing around trying to find a solution to my problem and came across this post, which describes a situation quite similar to the one I'm having. I also migrated from XP to Vista, with the difference that I'm using ASP.NET 3.5 and VS 2008. I have already set ASP.NET state services to automatic (the original poster's problem seems to be he couldn't find it), and the session state parameter is set to 127.0.0.1:42424 in the web.config file (the port 42424 matches the port set on windows registry). However, the problem remains the same. Any pointers?
0
edhc44
10/29/2008 1:10:54 PM
Nevermind, I had set the service to automatic but forgot to start it...
0
edhc44
10/29/2008 1:17:30 PM
Reply:

Web resources about - Visual Studio 2005 - Unable to make the session state request to the session state server. - asp.net.state-management

Joint session of the United States Congress - Wikipedia, the free encyclopedia
Joint sessions of the United States Congress are the gatherings together of both houses of the United States Congress (the House of Representatives ...

Tomas Cubelli arrives in Canberra as Brumbies land blows at AIS boxing session
An immigration hold-up and passport confusion threatened to delay Tomas Cubelli's ACT Brumbies' arrival.

Houston schools in session in spite of threatening email - abc13.com
Houston ISD is sending parents across the school district automated phone calls, notifying them of a threat it received.

A rambunctious photo session with the first IVF puppies
The birth of seven puppies by in vitro fertilization comes after decades of research

Sessions Teams Up With Florida’s Democratic Senator To Fix H-1Bs
Sessions Teams Up With Florida’s Democratic Senator To Fix H-1Bs

Not so fringe after all: Sen. Sessions angles to consider Trump's Muslim ban in Judiciary Committee
Never mind that people around the world are decrying Trump's Muslim ban as bringing the U.S. to the " brink of fascism ," Sen. Jefferson Beauregard ...

GoPro's Hero4 Session camera drops to a more reasonable $199
When GoPro launched its cube-shaped Hero4 Session camera, we wouldn't have blamed you for giving it a pass. Why pay $399 (eventually $349) for ...

Justin Bieber's Neck Tattoo Artist Spills Everything About His Late-Night Ink Session
Justin Bieber's Neck Tattoo Artist Spills Everything About His Late-Night Ink Session

io9 Book Club Is In Session: Let's Talk About Cecelia Holland's Dragon Heart!
Welcome to the monthly meeting of the io9 Book Club . This month, we’ve read Dragon Heart by Cecelia Holland .. Jump into comments to get started ...

Vincent Cassel Goes Shirtless for Surfing Session
Vincent Cassel shows off his fit body while going shirtless at the beach on Wednesday (December 9) in Rio de Janeiro, Brazil. The 49-year-old ...

Resources last updated: 12/18/2015 7:26:46 AM