大网数据广告活动
Web服务器与PHP

0-byte file is returned

· 52CE 我爱测

This article provides a resolution for the problem where A 0-byte file might be returned when compression is enabled on a server that is running IIS.

This article helps you resolve the problem where a 0-byte file might be returned instead of the expected file when compression is enabled on a server that is running Microsoft Internet Information Services (IIS).

Original product version:   Internet Information Services 8.0, 8.5
Original KB number:   817442

Symptoms

When compression is enabled on a server running IIS, and an HyperText Transfer Protocol (HTTP) request is served from the IIS compression directory, a 0-byte file may be returned instead of the expected file.

Note: You may only see these symptoms if HTTP Static Compression is enabled.

Cause

Antivirus software running on the IIS server is scanning the IIS compression directory.

Resolution

Exclude the IIS compression directory from the antivirus software's scan list. The steps may vary based on the antivirus software you're using. Microsoft recommends you contact the manufacturer of the antivirus software for information about how to exclude directories from scanning.

More information

The default compression directory in IIS 6.0 is %systemroot%\IIS Temporary Compressed Files. This directory may have been changed to another location. In IIS 7.0 or a later version for IIS 7.0, the default location of the compressed file cache is %SystemDrive%\inetpub\temp\IIS Temporary Compressed Files.

To verify the compression directory, follow these steps:

  1. Select Start, point to Programs, point to Administrative Tools, and then select Internet Information Services (IIS) Manager.
  2. In IIS Manager, right-click the Web Sites folder, and then select Properties.
  3. Select the Service tab.
  4. Under HTTP Compression, make sure that Compress static files is selected, and then locate the path to the temporary directory.

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 03/30/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。