Session state requests cannot be made to the session-state server. Make sure that the ASP. NET state Service (ASP.

Source: Internet
Author: User

Method one. Web. config changes the mode of sessionstate to "InProc" (default)

Inside the Web. config:
<sessionstate mode= "InProc" stateconnectionstring= "tcpip=127.0.0.1:42424" sqlconnectionstring= "Data source= 127.0.0.1;user id=sa;password= "cookieless=" false "timeout="/>

If it is stateserver, it means that the State service is in the remote server mode, you need to set the server string and password parameters.

Method Two: Enable the "ASP. NET State Service" in Windows services

Introduction to the session model

What is the session? In simple terms, the server gives the client a number. When a WWW server is running, there may be a number of users browsing the Web site that is being shipped on this server. When each user establishes a connection to this WWW server for the first time, he establishes a session with the server, and the server automatically assigns it a SessionID to identify the user's unique identity. This SessionID is a 24-character string randomly generated by the WWW server, and we'll see what it looks like in the experiment below.

The only SessionID is of great practical significance. When a user submits a form, the browser automatically attaches the user's SessionID to the HTTP header information (this is the browser's automatic function, which the user will not perceive), and when the server finishes processing the form, the result is returned to the user of SessionID. Imagine, if there is no SessionID, when two users register at the same time, how the server can know exactly which user submitted which form.

Session configuration information in the Web. config file
After opening the configuration file for an application, Web. config, we will find the following paragraph:

<sessionstate
Mode= "InProc"
Stateconnectionstring= "tcpip=127.0.0.1:42424"
sqlconnectionstring= "Data source=127.0.0.1; Trusted_connection=yes "
Cookieless= "false"
Timeout= "20"
/>

Where mode sets the session information to where, OFF is set to not use the session function; InProc is set to store the session in process, is the ASP storage mode, which is the default value; The StateServer is set to store the session in a separate state service; SQL Server settings stores the session in a

Session state requests cannot be made to the session-state server. Make sure that the ASP. NET state Service (ASP.

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.