Resolution of lost after session landing

Source: Internet
Author: User
session| solve |session recently do web site backstage, after landing found that the session will be lost when refreshing the page, after a few seconds will naturally be lost, after the data found can be resolved:

1. Open the Web.config file and set the following:

<!--session state settings
By default, ASP.net uses cookies to identify which requests belong to a specific session.
If the Cookie is not available, you can track the session by adding the session identifier to the URL.
To disable cookies, set sessionstate cookieless= "true".
-->
<sessionstate
Mode= "StateServer"//is modified here as "StateServer"
Stateconnectionstring= "tcpip=127.0.0.1:42424"
sqlconnectionstring= "Data source=127.0.0.1; Trusted_connection=yes "
Cookieless= "false"
timeout= "30"
/>

2. Open the Control Panel-management tool-service to find the ASP.net State service, and start it.

So later refresh the page will not lose session, haha!



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.