<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll" />
<staticTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/atom+xml" enabled="true" />
<add mimeType="application/xaml+xml" enabled="true" />
<add mimeType="application/json" enabled="true" />
<add mimeType="*/*" enabled="false" />
</staticTypes>
<dynamicTypes>
<add mimeType="text/*" enabled="true" />
<add mimeType="message/*" enabled="true" />
<add mimeType="application/x-javascript" enabled="true" />
<add mimeType="application/json" enabled="true" />
<add mimeType="*/*" enabled="false" />
</dynamicTypes>
</httpCompression>
在 C:\Windows\Microsoft.NET\Framework64\v2.0.50727\Aspnet.config 之下, 可以設定
<
system.web
>
<
applicationPool
maxConcurrentRequestsPerCPU
=
"12"
maxConcurrentThreadsPerCPU
=
"0"
requestQueueLimit
=
"5000"
/>
</
system.web
>
另外,在 registry 中,可以設定 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET\2.0.50727.0\MaxConcurrentRequestsPerCPU
參考:
http://blogs.msdn.com/b/tmarq/archive/2007/07/21/asp-net-thread-usage-on-iis-7-0-and-6-0.aspx
cmd
cd C:\Windows\System32\inetsrv
※備份 backup.bat
*備份應用程式集區
appcmd list apppool HCI /config /xml >D:\IISSetting\appHCI.xml
*備份Site
appcmd list site HCI /config /xml >D:\IISSetting\HCI.xml
※還原 restore.bat
*備份應用程式集區
appcmd add apppool /name:HCI /in <D:\IISSetting\appHCI.xml
*備份site
appcmd add site /name:HCI /in <D:\IISSetting\HCI.xml
註1.HCI=>site name
註2.打開site的xml, 調整Id的值(不可與還原主機的IIS上已有ID重複)