Saving Session using State Server Mechanism

Posted by Akiii under ASP.NET on 9/18/2011 | Points: 10 | Views : 1582 | Status : [Member] | Replies : 6
Hi all,
I have made a small application in which i want to save my value of username and password in session by using State Server Mechanism.
I have edited my web.config file for enabling state server.

I have also enabled the state server service.
 <sessionState mode="StateServer" 
stateConnectionString="tcpip=localhost:10162"
cookieless="false"
stateNetworkTimeout="10">
</sessionState>


But when i try to login in, its not going anywhere and its prohibiting me from login also.

Please help me regarding this. I am attaching my project for your perusal.

Thanks and Regards
Akiii




Responses

Posted by: SheoNarayan on: 9/18/2011 [Administrator] HonoraryPlatinum | Points: 25

Up
0
Down
Hi Akii,

Have a look at this video, it should help.

http://www.dotnetfunda.com/tutorials/videos/x100-video-how-to-configure-use-state-server-session-management-.aspx

Thanks

Regards,
Sheo Narayan
http://www.dotnetfunda.com

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 9/18/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi sir,
I saw that video earlier only. After watching the video, i made that simple application for testing purpose. Everything is working fine, but when i close my browser and want to see the default page after login then it is redirecting me the login page.
I shouldn't be logging because i have already signed up earlier. After closing the browser why doesn't the browser persists the information ?

Am i doing anything wrong ?
Please help me regarding this !

Thanks and Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 9/18/2011 [Member] Bronze | Points: 25

Up
0
Down
A more real life detailed scenario will be "Suppose: I login into the gmail account and then close the browser, again i open the browser and open the gmail.com website, then i am automatically loaded into the previous session. I dont have to login again. How can this be possible" !

Regards
Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Seenuvasan on: 9/19/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

I followed above mentioned video and created sample app. but it's produce following error msg.
Pls look on this and guide me

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.


Thanks,
Seen

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Akiii on: 9/19/2011 [Member] Bronze | Points: 25

Up
0
Down
Hi Seen,
Enable the ASP.NET State Server service......!

Akiii

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Seenuvasan on: 9/20/2011 [Member] Starter | Points: 25

Up
0
Down
Hi Akiii,

Already enabled ASP.NEt state Server services

Thanks,
Seen

Akiii, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response