Aspnet state error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to make a web aspnet solution with Visual Studio .net 2005 on a
Vista PC.
I have this lines on webconfig :
<sessionState
mode="StateServer"
cookieless="false"
timeout="20"
stateConnectionString="tcpip=127.0.0.1:42424"

I received this 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
 
You are not reaching the state server. There are a couple of possibilities:

1. The State Server service is turned off. This is the default condition of
the state server, so this is the most common reason for the exception. To
turn it on Start >> Administrative Tools >> Services. Look for ASP.NET State
Server and turn it on. You should also set it to automatic rather, than
manual, if you are developing this way.

2. The State Server is not located on port 42424. That is the default. More
info on other ports here:
http://weblogs.asp.net/despos/archive/2005/09/01/424194.aspx

3. The ASP.NET user account does not have the proper permissions. I do not
have the account information in front of me for Vista. Depending on Windows
OS and possibly framework version, you have different accounts here. I am
not sure if upgrade to Vista properly switches out the account, as it is
different in XP, so that could be an issue. Once you know which account
ASP.NET runs under, you can work out permissions. Local admins is OK (not
great, but OK) if this is purely a dev machine. I don't have the actual
perms list in front of me, so it is something to Google if you get this far.

Most likely, #1 will solve your problem.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Blog:
http://feeds.feedburner.com/GregoryBeamer

*************************************************
| Think outside the box! |
*************************************************
 
Hi,

Besides what Gregory said, you can use TcpView to check if the ASP.NET
state service is listening on the correct port.

http://technet.microsoft.com/en-us/sysinternals/bb897437.aspx

If it still doesn't work, please update here. I'll do my best to follow up.

Regards,
Allen Chen
Microsoft Online Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 2 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions. Issues of this
nature are best handled working with a dedicated Microsoft Support Engineer
by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/en-us/subscriptions/aa948874.aspx
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Thank's for the Help.

1) The state server is tuned on.
2) Is located on port 42424.
3) My asp.net user account is in the administrators Group.
4) I find that the asp.net state service start with network service user.
5) I use TCPVIEW and i find :
aspnet_state.exe:5944 TCP PC-dino:42424 PC-dino:0 LISTENING

Regards
Dino Dentone
Chemical Controls s.r.l.
 
Hi Dino,

It looks very strange. I tested it on a Vista x64 SP1 machine. The setting
is the same as yours but it works fine. Could you try to connect to a
working ASP.NET state service that is running on a remote machine? Can it
work? If it does we can narrow down the issue to the ASP.NET sate service
itself that runs on your Vista machine.

As another trial, please try the following way to see if it works:
Go to Control Panel->Programs and Features->Turn Windows features on or off
Find:
Internet Information Service->World Wide Web Services->Application
Development Features->ASP.NET, uncheck the item and click OK.
Then Find this item again, check the item and click OK to turn on this
feature.

BTW, does it happen after publishing or in debug time? Is it possible that
the configure file get changed after publishing to IIS 7?

If it still doesn't work please provide the details information of your
operating system. I'll set up a test environment to see if I could
reproduce this issue.

Regards,
Allen Chen
Microsoft Online Support
 
The problem is in debug time.
I have windows Vista ultimate 32 bit and Visula Studio . net professional
2005.
 
Hi Dino,

Thanks for your update. I've sent a request to our internal support to set
up a virtual machine with the same environment as yours. This may take one
or two days. I'll do some test to see if it can be reproduced. If you have
any clues that can help to repro it please update here.

In the mean time, could you try to connect to a working ASP.NET state
service that is running on a remote machine? Can it work?

I'll get back to you as soon as possible.

Regards,
Allen Chen
Microsoft Online Support
 
Hi Dino,

I spent several hours trying to repro it but failed. Now I wonder if
there's any third party product installed on your machine that could affect
this. Can you successfully ping 127.0.0.1? Could you turn off your
firewall, close all third party programs shown in the task manager and try
again? Can it work?

Regards,
Allen Chen
Microsoft Online Support
 
Hi Dino,

Have you tested it? What's the result?

Regards,
Allen Chen
Microsoft Online Support
 
Hi Dino,

Thanks for you update. I found we have two things not tested yet that were
mentioned in my previous posts. See below:

--As another trial, please try the following way to see if it works:
Go to Control Panel->Programs and Features->Turn Windows features on or off
Find:
Internet Information Service->World Wide Web Services->Application
Development Features->ASP.NET, uncheck the item and click OK.
Then Find this item again, check the item and click OK to turn on this
feature.

--could you try to connect to a working ASP.NET state
service that is running on a remote machine? Can it work?


Could you test them and tell me the result? In the mean time I'll keep
testing on my side to see if it can be reproduced.

Regards,
Allen Chen
Microsoft Online Community Support
 
Hi Dino,

Have you tested it? To turn off and turn on ASP.NET features will restore
the state of the ASP.NET state service to its original state. The test to
connect to a working ASP.NET state service on another machine will help us
narrow down this issue.


Regards,
Allen Chen
Microsoft Online Community Support
 
Back
Top