Updated: 16 November 2026 · Applies to: IIS 7 to IIS 10 on Windows Server, ASP.NET 2.0 to 4.x applications

IIS shows "HTTP Error 500.22 (or 500.23 or 500.24): An ASP.NET setting has been detected that does not apply in Integrated managed pipeline mode" when a site's web.config has settings written for the old Classic pipeline while its application pool runs in Integrated mode. The best fix is to migrate the configuration with one AppCmd command. The quick fix is to tell IIS to skip the check with validateIntegratedModeConfiguration="false". Both are explained below, with the case where you should switch to Classic mode instead.

Which error number do you have?

According to Microsoft, the number on the error page points to the cause:

  • 500.22 or 500.23: web.config has <httpModules> or <httpHandlers> inside <system.web>. In Integrated mode, modules belong in <system.webServer>/<modules> and handlers in <system.webServer>/<handlers>.
  • 500.24: web.config has <identity impersonate="true" />. Integrated mode cannot impersonate the user in the earliest stages of a request.

New application pools run in Integrated mode by default, which is why this often appears after moving an older site to a new server.

Fix 1: migrate the configuration (recommended for 500.22 and 500.23)

  1. Back up the site's web.config.
  2. Open Command Prompt as Administrator on the server.
  3. Run AppCmd with the site name and the application path, exactly as IIS Manager shows them. For an application at the root of a site called example.com:
%windir%\system32\inetsrv\appcmd migrate config "example.com/"

For an application in a subfolder, add its path, for example "example.com/app1". According to Microsoft, the error page itself usually shows the exact command for your site, so you can copy it from there.

AppCmd copies the modules and handlers into <system.webServer> and adds the validation setting, so the application then works in both Integrated and Classic mode. If you change modules or handlers later, keep both sections in step yourself: IIS does not ask you to migrate a second time.

Fix 2: migrate by hand

If you cannot run AppCmd (for example on shared Windows hosting without server access), edit web.config:

  1. Copy each <add> entry from <system.web><httpModules> into <system.webServer><modules>, and each entry from <system.web><httpHandlers> into <system.webServer><handlers>. In the new <handlers> section, name, path and verb are required on every entry, so give each handler a unique name.
  2. Then either remove the old <httpModules> and <httpHandlers> sections, or keep them (for Classic mode) and add the validation setting below.

Fix 3: switch off the check

Add this inside <configuration> in the site's web.config. If a <system.webServer> section already exists, put only the <validation> line inside it rather than adding a second section:

<system.webServer>
  <validation validateIntegratedModeConfiguration="false" />
</system.webServer>

This removes the error page, but it does not move your modules or handlers. Any module or handler that is listed only under <system.web> is still ignored in Integrated mode, so test the site properly afterwards. Microsoft does not recommend this as a substitute for migrating.

For 500.24, this setting is the right fix when the application does not need to impersonate the user at the very start of a request (the BeginRequest and AuthenticateRequest stages). Most applications do not.

When to use Classic mode instead

Move the site to a Classic application pool only as a last resort: when the application relies on impersonation in those early stages, or when the fixes above do not work and you cannot change the code. According to Microsoft:

  1. In IIS Manager, under Application Pools, click Add Application Pool, give it a name, choose the .NET Framework version the site uses and set Managed pipeline mode to Classic.
  2. Select the site, click Advanced Settings, and under General change Application Pool to the new pool.

Applications in other pools keep running in Integrated mode, so one old site does not affect the rest of the server.

Related errors

Need someone to look at the site's configuration? Our engineers can help through Hire an Expert.

Official documentation: ASP.NET integration with IIS and ASP.NET 2.0 breaking changes on IIS.

Related services

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Unmanaged dedicated servers

full root access and free IPMI KVM, with Free Basic Managed Support.

Managed dedicated servers

our engineers look after the server for you, from $135 a month.

Was this answer helpful?

Still stuck? Open a ticket