Recently, I am working on the IIS ASPnet project, which requires a high access speed on the homepage.
By configuring the apppool, You can effectively improve the IIS response speed.
After HTTP compression is enabled for IIS Program Processing and Ajax calls produce problems.
The HTTP compression configuration of IIS is relatively simple and cannot be easily obtained.
I found blowery. Web. httpcompress (online documentation), which has a good performance rating.
Configuration
Web. config
<Configsections>
<Sectiongroup name = "blowery. Web">
<Section name = "httpcompress" type = "blowery. Web. httpcompress. sectionhandler, blowery. Web. httpcompress"/>
</Sectiongroup>
</Configsections>
Blowery. Web
<Blowery. Web>
<Httpcompress preferredalgorithm = "gzip" compressionlevel = "high">
<Excludedmimetypes>
<Add type = "image/JPEG"/>
<Add type = "image/GIF"/>
<Add type = "text/plain"/> <! -- Solve the problem that AJAX callback does not support compression formats -->
</Excludedmimetypes>
<Excludedpaths>
<Add Path = "nocompress. aspx"/>
</Excludedpaths>
</Httpcompress>
</Blowery. Web>
Excludedmimetypes contained in this mime type will not be compressed
Excludedpaths The contained aspx will not be compressed
Note: Source code A bug excludepaths does not work.
String realpath = "";
Try
{
Logger. debug (App. Request. applicationpath );
Realpath = app. Request. Path. Remove (0, app. Request. applicationpath. Length );
}
Catch (exception ex)
{
Logger. debug (ex. Message );
Realpath = "/";
}
After testing, a 35 K page can be controlled at 10 ~ 15 K size, which greatly speeds up transmission.
The overall effect is good.