Objective: there are more than a dozen application address pools on the company's server IIS, which are usually accidentally stopped. There are a lot of warning logs in the system logs of the stop line, and then it is stopped and analyzed several times, some people on the Internet say that a website should be checked for problems,
However, the website has so many other addresses. Who knows from which request the application address pool will be suspended? during the day, someone can watch the server at any time, it is troublesome to stop at night. All applications can automatically monitor the application address pool as needed.
In fact, the method is very simple, that is, to regularly traverse the application address pool and check whether there is an unstarted application address pool. If yes, execute the startup command.
entPath = ( DirectoryEntry rootEntry = (DirectoryEntry AppPool (AppPool.Properties[].Value.ToString() != LogHelper.Wirte( + AppPool.Name + AppPool.Invoke(, LogHelper.Wirte(AppPool.Name + Thread.Sleep( }
This method is done, and monitoring is performed once every 10 minutes without occupying any system resources.
However, the collection of application address pools in IIS is actually a special address. Any configuration in IIS can be obtained.
Recommend a visualization tool
Use IIS resource management tools: http://download.csdn.net/detail/cake_green/6756847 this points ha you can also Baidu
The corresponding address is IIS: // LOCALHOST/W3SVC/AppPools LOCALHOST, which can also be an IP address or server name.
Finally, install it on the server as a service, and it will be OK after it is started.
The main purpose of writing this blog is to record the operation function of IIS. With the configuration address of IIS, you can perform any program operation on IIS according to your own business.