In the Web Park, [] _ solved the problem of IIS session loss a few days ago. It took a long time to solve the problem and finally found that the number of working processes in the Web garden was greater than 1, the session cannot be obtained. I found the following information online:
When you create an applicationProgramWhen the application pool is created, IIS 6 is notified to create a working process to transmit the content of the Web site, file, and folder assigned to the application pool. You can configure the application pool to start more than one worker process, which improves scalability. This function is called Web garden, which is a small "Web farm ". Instead of using multiple computers to transmit the same content (Web farm), you can use multiple processes in one computer to transmit the same content.
When you configure an IIS 6 application as a web garden, you only need to go to the "Maximum number of worker processes" box on the "performance" tab of "application pool properties, set the number of worker processes greater than 1. If the value is greater than 1, each request starts a new worker process instance. The maximum number of worker processes that can be started is the maximum number of worker processes you specify. Subsequent requests will be sent to the working process cyclically.
Web parks are useful when your application resources are limited. For example, if your connection to the database is slow, you can use multiple working processes to increase user throughput and the number of connections to the database.
Although the use of web Parks is very useful in some cases, you must note that the session information of each worker process is unique. Because requests are routed to the application pool Worker Process cyclically, the Web garden may not be very useful for the applications in which session information is stored. In a few cases, resource competition may occur when multiple worker processes run the same application. For example, if all worker processes attempt to record information to log files, or use resources that are not dedicated to multiple concurrent accesses, resource competition may occur.