Applicable IIS version: IIS 7.0, IIS 7.5, IIS 8.0
Applicable versions of Windows: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012
1, the application pool (application pool) settings:
General->queue length is set to 65535 (the maximum value supported by the queue Length)
Process Model->idle time-out set to 0 (does not allow application pools to be reclaimed because no requests are made)
Recycling->regular time interval set to 0 (disable application pool for periodic automatic recycling)
2. Net framework-related settings
A) in Machine.config
Copy Code code as follows:
<processmodel autoconfig= "true"/>
To
Copy Code code as follows:
<processmodel enable= "true" requestqueuelimit= "100000"/>
(This setting takes effect immediately after saving)
b) Open C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\Browsers\Default.browser and find <defaultbrowser id= " Wml "parentid=" "Default", Comment <capabilities> section, and then run aspnet_regbrowsers-i on the command line.
Copy Code code as follows:
<defaultbrowser id= "Wml" parentid= "Default" >
<identification>
</identification>
<!--
<capabilities>
<capability name= "PreferredRenderingMime" value= "TEXT/VND.WAP.WML"/>
<capability name= "PreferredRenderingType" value= "Wml11"/>
</capabilities>
-->
</defaultBrowser>
To solve the TEXT/VND.WAP.WML problem.
3, IIS applicationhost.config settings
To set the command:
Copy Code code as follows:
C:\windows\system32\inetsrv\appcmd.exe Set config/section:serverruntime/appconcurrentrequestlimit:100000
To set the result:
Copy Code code as follows:
<serverruntime appconcurrentrequestlimit= "100000"/>
(This setting takes effect immediately after saving)
4, the HTTP.sys setting
Registry Settings Command 1 (set the maximum number of connections to 100,000):
Copy Code code as follows:
REG ADD hklm\system\currentcontrolset\services\http\parameters/v maxconnections/t reg_dword/d 100000
Registry Settings Command 2 (resolve bad request-request Too long problem):
Copy Code code as follows:
REG ADD hkey_local_machine\system\currentcontrolset\services\http\parameters/v maxfieldlength/t reg_dword/d 32768
REG ADD hkey_local_machine\system\currentcontrolset\services\http\parameters/v maxrequestbytes/t reg_dword/d 32768
(You need to run net stop HTTP & net start HTTP & IISReset on the command line to make the settings effective)
5, for the load balancing scene settings
Add the following rule in the URL Rewrite module:
Copy Code code as follows:
<rewrite>
<allowedServerVariables>
<add name= "REMOTE_ADDR"/>
</allowedServerVariables>
<globalRules>
<rule name= "Http_x_forwarded_for-to-remote_addr" enabled= "true" >
<match url= ". *"/>
<serverVariables>
<set name= "REMOTE_ADDR" value= "{http_x_forwarded_for}"/>
</serverVariables>
<action type= "None"/>
<conditions>
<add input= "{http_x_forwarded_for}" pattern= "^$" negate= "true"/>
</conditions>
</rule>
</globalRules>
</rewrite>
6. Set Cache-control as Public
Add the following configuration to the web.config:
Copy Code code as follows:
<configuration>
<system.webServer>
<staticContent>
<clientcache cachecontrolcustom= "Public"/>
</staticContent>
</system.webServer>
</configuration>