Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

IIS HTTP Error 500.24: "An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode"

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

HTTP Error 500.24 means an ASP.NET application in an Integrated-mode application pool has <identity impersonate="true" /> in its configuration, and IIS has stopped it with its migration check. Microsoft gives two ways out: tell IIS to stop checking, if the application does not rely on impersonation in the earliest request stages, or run the application in an application pool set to Classic mode. Other 500.2x errors, such as 500.22 and 500.23, come from httpModules and httpHandlers entries and are fixed differently.

What the error means

In Microsoft's words, you will receive "a 500 - Internal Server Error" that is "HTTP Error 500.24: An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode", and the cause is that "ASP.NET Integrated mode is unable to impersonate the request identity in the BeginRequest and AuthenticateRequest pipeline stages."

On IIS 7.0 and above, ASP.NET applications run in Integrated mode by default. The validation element of system.webServer makes IIS generate a migration error when its validateIntegratedModeConfiguration attribute is true and the application's web.config has any one of: an httpModules section, an httpHandlers section, or <identity impersonate="true" />. Of the three, only the third raises 500.24. Microsoft's validation page says client impersonation "is not available in some early request processing stages", and that if your application impersonates client credentials (most common with intranet applications), you may want to set the attribute to false.

Integrated mode is a property of the application pool. Microsoft's pool reference describes managedPipelineMode as Classic, which uses separate IIS and ASP.NET pipelines, or Integrated, the integrated pipeline that works only with ASP.NET 2.0 or later.

Likely causes

Cause What you see How to confirm
<identity impersonate="true" /> in web.config (the cause of 500.24) 500.24 when the application is requested The element is present in the application's web.config
httpModules or httpHandlers entries 500.22 or 500.23, not 500.24 The sections are present in web.config
Application moved from an older IIS or a Classic pool Worked before the move The pool shows MgdMode:Integrated
A custom module relies on the client identity in BeginRequest or AuthenticateRequest Errors or wrong identity in resource access Read the module code with the developer

Prove the cause before changing anything

All of these steps only read.

1. Match the code. The detailed error shows the status 500 and sub-status 24. If it shows 500.22 or 500.23, the cause is module or handler configuration, not impersonation.

2. Find the application and its pool. The form below is Microsoft's list apps example; "Default Web Site" is a placeholder for your site.

%systemroot%\system32\inetsrv\APPCMD list apps /site.name:"Default Web Site"

Each line ends with applicationPool: and the pool name.

3. Read the pool's mode.

%systemroot%\system32\inetsrv\APPCMD list apppools

Microsoft's output for this command shows the integration mode as MgdMode, with Integrated for an Integrated pool. Microsoft's AppCmd page shows a Classic pool as MgdMode:ISAPI, so that is what a Classic pool looks like after a move, not a failure.

4. Read the application's web.config. Open it in a text editor and look in system.web for <identity impersonate="true" />, and for httpModules and httpHandlers. Note whether system.webServer already contains a validation element.

5. Ask what the application does with the client identity. Microsoft says the only stages in which impersonation is not possible in Integrated mode are BeginRequest and AuthenticateRequest. The question for the developer is whether any module in the application relies on acting as the signed-in user in those two stages. If the answer is yes or unknown, use the Classic mode route below.

Fix

Choose one route.

The application does not need impersonation in the early stages

Microsoft's workaround A: if the application does not rely on impersonating the requesting user in BeginRequest and AuthenticateRequest, add the validation element to the application's web.config to ignore the error.

First save the current state:

copy D:\sites\app.example.com\intranet\web.config D:\sites\app.example.com\intranet\web.config.2026-12-03

Risk: the next edit turns off IIS's migration check for this application. IIS then stops warning about unsupported configuration, so a real impersonation problem, if there is one, fails silently or with a different symptom instead of this error. Microsoft says to make sure the application works in Integrated mode first. Saving the change also restarts the ASP.NET application, because Microsoft's page says IIS 7.0 and above always restarts ASP.NET applications when their root web.config changes. Our own reading: sessions held in the application's memory are then lost and requests in flight may fail.

Edit the application's web.config. Inside system.webServer, add:

<validation validateIntegratedModeConfiguration="false" />

Risk, only if you back out: the command below overwrites the application's web.config with the saved copy, which restarts the application again and discards any other edit made to the file since the save.

To undo it: copy the saved file back over web.config and request the page again. The 500.24 error returns if the cause is still present.

copy D:\sites\app.example.com\intranet\web.config.2026-12-03 D:\sites\app.example.com\intranet\web.config

The application relies on impersonation, or you are not sure

Microsoft's workaround B says to move the application to Classic mode. Mode belongs to the pool, so the application is moved to a pool configured for Classic. Microsoft names "Classic .NET AppPool" as the pool that ASP.NET setup provides for this, and it warns that Classic mode is a last resort because the application cannot use Integrated mode features.

First save the current state:

%systemroot%\system32\inetsrv\APPCMD list apps /site.name:"Default Web Site" > apps-before.txt

Risk: the next command moves the application to a different application pool. Our own reading: its worker process changes, so in-memory state such as sessions held by the old pool is lost, and the application then runs under the other pool's identity, .NET version and recycling settings.

Move the application. Microsoft's form is set app with the /applicationPool property; the quotes around a name with spaces are our own addition.

%systemroot%\system32\inetsrv\APPCMD set app "Default Web Site/intranet" /applicationPool:"Classic .NET AppPool"

Risk, only if you back out: the command below moves the application back to its first pool, so its worker process changes again and in-memory state held by the current pool is lost.

To undo it: read the pool name recorded for this application in apps-before.txt and set it back, then list the apps and compare. In the block below, <pool name from apps-before.txt> is a placeholder for that name.

%systemroot%\system32\inetsrv\APPCMD set app "Default Web Site/intranet" /applicationPool:"<pool name from apps-before.txt>"

The error is 500.22 or 500.23 instead

Those codes come from httpModules and httpHandlers entries, not from impersonation. Microsoft's two workarounds are to migrate the configuration with the command %windir%\system32\inetsrv\Appcmd migrate config "<ApplicationPath>", where the path is the virtual path of the application such as "Default Web Site/app1", or to move the entries by hand into the handlers and modules sections of system.webServer. For an encrypted identity section, which Microsoft's page ties to a different error (500.19), the page says AppCmd migration adds the validateIntegratedModeConfiguration="false" line to the application's web.config itself. Its 500.24 item lists only the validation line and Classic mode as ways out. Our own reading: migration rewrites the application's configuration, so it would need the same save-first copy, warning and undo as the edit above, and this page only describes it.

Example (illustrative): on app01, the application Default Web Site/intranet returns 500.24. list apppools shows DefaultAppPool with MgdMode:Integrated. Its web.config holds <identity impersonate="true" /> and no httpModules or httpHandlers. The developer confirms that no custom module touches files before PostAuthenticateRequest. The administrator saves web.config, adds the validation element, and the page loads.

Confirm the fix

  1. Request the application's URL again, signed in as an ordinary user and as a test user with fewer rights; the 500.24 page no longer appears for either.
  2. Check that the signed-in user's access still behaves as designed: open a page that reads a resource through impersonation and confirm it succeeds for an allowed user and fails for a user who has no rights.
  3. After a pool move, run list apps again and confirm the application shows the pool you chose. Run list apppools and expect MgdMode:ISAPI for a Classic pool.

What to watch afterwards

  • Our own advice: record each application where the check is off, with the reason, so that a later upgrade does not treat it as an oversight.
  • Microsoft's list of Integrated mode changes says IIS 7.0 and above always restarts an ASP.NET application when its root web.config changes, so make edits, and the undo, outside busy hours.

Risks and limits

Sources