🚀 Welcome to MDriven Learn –  MDriven is now on Discord!  Don’t miss the latest Release Notes.
IIS application restart problem
This page was created by Lars.olofsson on 2020-11-12. Last edited by Wikiadmin on 2026-07-29.

You can stop repeated IIS or Azure Web App restarts caused by file-change notifications by ensuring that IIS disables file-change monitoring in the configuration that applies to your MDrivenServer or Turnkey application.

Recognize this restart cause

Check the MDrivenServer or Turnkey log files when the application restarts repeatedly. This page applies when the log indicates an IIS or Azure Web App restart caused by change notifications, for example:

Azure Web App Restarting Automatically Due to Overwhelming Change Notification or IIS Configuration Change.

IIS monitors changes to files in a web application. After enough detected changes, IIS can recycle the application pool. MDrivenServer and Turnkey control their own site updates, so this behaviour must be disabled for the application.

Disable file-change notifications

The fcnMode setting controls file-change notifications. Set it to Disabled in the applicable web.config file.

<httpRuntime maxRequestLength="2147483647" executionTimeout="300" targetFramework="4.5" requestValidationMode="2.0" fcnMode="Disabled" />

Both MDrivenServer and Turnkey include this setting in their own configuration. In a normal deployment, confirm that the application's web.config has not been replaced or changed during deployment or upgrade.

Fix an application below an otherwise empty IIS site root

You need an additional root-level web.config when MDrivenServer is installed as an IIS application in a subdirectory, such as __MDrivenServer, and no Turnkey server is installed in the IIS site root.

For example, if the IIS site points to a root folder and MDrivenServer is located at:

&lt;site root&gt;\__MDrivenServer

place a web.config in <site root>, not only in __MDrivenServer. Use the following configuration:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <location path="__MDrivenServer">
    <system.web>
      <httpRuntime maxRequestLength="2147483647" executionTimeout="300" targetFramework="4.5" requestValidationMode="2.0" fcnMode="Disabled" />
    </system.web>
  </location>
  <system.web>
    <httpRuntime maxRequestLength="2147483647" executionTimeout="300" targetFramework="4.5" requestValidationMode="2.0" fcnMode="Disabled" />
  </system.web>
</configuration>

The location element applies the setting to the __MDrivenServer application. The root system.web section applies the same setting at the IIS site root. This prevents the unconfigured root level from continuing to trigger file-change notification recycling.

Apply the configuration

  1. Identify the physical IIS site root and the application path in IIS Manager. Do not assume that the application folder is the site root.
  2. If MDrivenServer is in __MDrivenServer and the site root has no Turnkey installation, create or update web.config in the site root with the configuration above.
  3. Confirm that the path value in <location> matches the actual MDrivenServer application directory. For the example configuration, the directory must be named __MDrivenServer.
  4. Recycle the affected application pool, or restart the Azure Web App.
  5. Monitor the MDrivenServer or Turnkey logs to confirm that the repeated restart message no longer appears.

Scope and common mistakes

Situation What to do
Turnkey or MDrivenServer is installed at the IIS site root Verify that its own web.config retains fcnMode="Disabled".
MDrivenServer is installed in __MDrivenServer below an otherwise empty site root Add the root-level web.config shown above.
The application still fails to start, but the change-notification message is absent This is a different problem. Follow HowTos:Troubleshooting IIS application startup issues.
You are deploying or changing the IIS site structure Follow Documentation:Deploying MDriven Server & Turnkey Core on IIS for application pools, bindings, configuration files, and log locations.

Do not use app_offline.htm as a fix for restart loops. That file intentionally takes an application offline during maintenance; see Documentation:Maintenance page.

Related IIS configuration

Repeated restarts can also be caused by application-pool recycling or startup failures rather than file-change notifications. Keep those investigations separate:

See also