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.
- < 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:
- < machineKey
- validationKey="AutoGenerate,IsolateApps"
- decryptionKey="AutoGenerate,IsolateApps"
- validation="SHA1"
- decryption="Auto"
- />
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.
- ASP. net mvc unit test: confusing the Path attribute of the HttpContext class
- Custom ControllerFactory: interface implementation, supporting Area
- ASP. NET Routing
- Add custom routes for ASP. net mvc applications
- Learning how to use ASP. net mvc Routing