Q & A about ASP. NET Session State

Source: Internet
Author: User

Q: ASP. NET Session State service. Does it mean that in my production environment, if multiple programs call this service to store sessions, their SESSION management will be managed in the same process?

A: ASP. NET Session State service should be A unified manager. It has nothing to do with the site. Just like managing multiple sites in iis admin

Q: for example, I have two ASP. NET sites which are set in web. config.

 
 
  1. < sessionstate mode="stateserver" stateconnectionstring="tcpip=localhost:42424" timeout="60"/> 

Whether the session management is put in the same sessoin state Manager for self-management

Is there any recycling of this process? If this is the case, isn't all sessions gone, isn't it about restarting the server)

A: You can set the expiration time for the timeout attribute. The expiration time is cleared.

Q: Is it necessary to set the machineKey? I have added only the sessionstate settings for several websites. Will this cause a conflict between one server and multiple sites )? What is machineKey? What is its function? Where is the value obtained from?

A: machineKey settings:

 
 
  1. < machineKey   
  2.    validationKey="AutoGenerate,IsolateApps"   
  3.    decryptionKey="AutoGenerate,IsolateApps"      
  4.    validation="SHA1"   
  5.    decryption="Auto"   
  6. /> 

For details, refer to this article.

Q: This aspnet_stat.exeprocess will not be recycled like w3wp.exe. If it is recycled, it will not be miserable. All sessions will not be pulled at once.

A: All processes are executed in the memory, and will be recycled unless the memory is insufficient. Otherwise, session server is meaningless and not stored as sqlserver session. This is stopped when the system service starts. Of course, you can manually stop the process.

The above are some questions and answers about ASP. NET Session State.

  1. ASP. net mvc unit test: confusing the Path attribute of the HttpContext class
  2. Custom ControllerFactory: interface implementation, supporting Area
  3. ASP. NET Routing
  4. Add custom routes for ASP. net mvc applications
  5. Learning how to use ASP. net mvc Routing

Related Article

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.