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

Application can't run in Integrated Pipeline mode

· 52CE 我爱测

This article provides resolutions for the System.Web.HttpException that occurs when an application runs in Integrated Pipeline mode.

This article helps you resolve the System.Web.HttpException that occurs when an application runs in Integrated Pipeline mode, and provides a resolution.

Original product version:   Internet Information Services
Original KB number:   2605401

Symptoms

Consider the following scenario:

  • You run a web application configured to use the Integrated Pipeline on a Microsoft Internet Information Services (IIS) web server.
  • The application uses an ISAPI filter registered for the SF_NOTIFY_AUTHENTICATION event.
  • The application's global.asax implements the Application_BeginRequest event.

Under these conditions, this exception might occur:

System.Web.HttpException: This server variable cannot be modified during request execution.

Cause

This behavior is by design.

When IIS calls the ISAPI filter for the SF_NOTIFY_AUTHENTICATION event, it updates the AUTH_USER server variable. Since the application is configured to use the Integrated Pipeline, ASP.NET looks for changes in server variables. AUTH_USER is one of the variables that isn't expected to change, and therefore ASP.NET throws the exception.

This exception isn't thrown if the application pool is running in Classic mode instead of Integrated Pipeline mode.

Resolution

To prevent this exception, use one of the following methods:

  • Configure the application pool to run in Classic mode instead of Integrated Pipeline mode.
  • Use native or managed Http Modules to handle authentication notifications.

More information

For more information, see Develop a Native C\C++ Module for IIS.

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 12/16/2024
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

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

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