To: IIS ASPnet HTTP compression and Ajax

Source: Internet
Author: User
IIS ASPnet HTTP compression and Ajax

IIS ASPnet HTTP compression and Ajax are recently used in the IIS ASPnet project, which requires high homepage access speeds.
By configuring the apppool, You can effectively improve the IIS response speed.
After iis http compression is enabled, problems occur in aspx program processing and Ajax calling.
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 contained in this aspx will not be compressed

Note that there is a bug in the source code, which does not work when processing excludepaths.
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.

Trackback: http://tb.blog.csdn.net/TrackBack.aspx? Postid = 1499862
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

Note:
On Windows Server 6.0 running Microsoft Internet Information Services (IIS) 2003, use GNU zip (gzip) compressed static files may be unavailable or contain content from other files on the web server. In this case, an error is generated when a page is returned to the client, which may also cause access conflicts.
These problems may affect the "Outlook Network Access (OWA)" user and may cause code errors to be returned to the OWA page.

Microsoft has released a patch for the above problems. Its version number is 831464, And the size is 430 kb. This patch corresponds to the article in the Microsoft 831,464th knowledge base.

Click here to download the Simplified Chinese version of the patch.

Http://www.cnblogs.com/shanyou/archive/2005/08/20/218927.html
Http://www.cnblogs.com/dudu/archive/2004/12/12/76085.html
Http://blog.joycode.com/moslem/archive/2005/08/19/62173.aspx

,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,,,,
Documents at www.asp.net
Http://www.asp.net/ControlGallery/Disclaimer.aspx? Downloadcontrol = 696 & tabindex = 2

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.