Ajax problems caused by IIS Compression

Source: Internet
Author: User
Tags truncated

Recently, I tested on my computer and found that two normal software (B/S structure software developed by Asp.net) run in various environments, and there was an inexplicable script error, an error occurs when a directory or user is added to the system through the right-click menu. It is estimated that an error occurs when an Ajax response is received and processed. Through debugging with httpwatch and other tools, we found that the server page for Ajax processing runs normally, but the Ajax response content received by the client is inconsistent with the content sent by the server. The specific phenomenon is the response string XMLHTTP. responsetext is truncated from the client.

The first thing that comes to mind is the compatibility of the browser, the encoding of Ajax requests and responses, but it was all removed one by one. Use the keyword "XMLHTTP. responsetext is truncated to search. Many people have encountered this phenomenon, but they have not found the answer. The result is fruitless and no progress has been made after several hours.

After work, I woke up and finally realized that IIS was the first to be suspected of being compressed by IIS (this time there was no detour). I opened the IIS management interface and canceled the IIS compression option for the default website, however, a configuration error occurs during debugging. The original IIS setting is modified on the web. the config file is saved in the root directory of the website. After deleting this file, go to the top-level settings of IIS to cancel the related compression options, and then open the page for testing. The problem is found to be gone, and everything is normal.

It seems that the compression function of IIS has led to the truncation of the Output Response content. As to why this problem occurs, we have not studied it yet. I hope people of insight can add a question or two.

If you need to reproduce the problem, go to the http://ldsoft.cc to download the "Job Management System" software to install, and enter the user management interface to add user operations.

 

Attached test environment: Windows 7 Operating System (IIS 7.5), ie 8.0 browser, Asp.net 1.1ProgramThe runtime environment uses the original XMLHTTPRequest object for Ajax processing.

 

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.