- 3 minutes to read

Configuration Error - Target Framework 2.0 instead of 4.x

This guide helps you fix configuration errors caused by an IIS application pool that runs the wrong .NET CLR version for a Nodinite web site.

✅ Know which .NET CLR version each Nodinite application pool needs
✅ Fix the application pool in IIS Manager in a minute
✅ Avoid the error at the next install or update

Which .NET CLR Version Each Application Pool Needs

On Windows Server, every Nodinite Core Service and each IIS-hosted agent is its own IIS web site with its own application pool. The CLI install package creates the pools and sets their .NET CLR version; you don't set them by hand.

Web site runtime Examples Application pool .NET CLR version
.NET 10 (ASP.NET Core, through the Hosting Bundle) Web Client, Web API, Log API, Logging Service, Monitoring Service, MCP Server, and most agents No Managed Code
.NET Framework 4.8 The BizTalk, Windows Server, Dynamics CRM, and IBM DataPower agents .NET CLR Version v4.0.30319

The .NET 10 Hosting Bundle and .NET Framework 4.8 are both in the prerequisites. A .NET Framework 4.8 web site fails with the targetFramework error below when its application pool runs .NET CLR v2.0, for example after someone recreated the pool by hand or an old server template changed the default.

The Problem

The web site returns an HTTP 500 configuration error that points at the targetFramework attribute of httpRuntime:

HTTP runtime configuration error caused by the targetFramework attribute
Example of the error a .NET Framework 4.x web site shows when its application pool runs .NET CLR v2.0.

Solution

Set the application pool of the failing web site to the .NET CLR version in the table above.

How do I change the .NET CLR version of an application pool?

  1. Click Start, click Run, type inetmgr, and click OK to open Internet Information Services (IIS) Manager.
  2. In the tree, expand the server and click Application Pools.
  3. Find the application pool of the failing Nodinite web site.
  4. Right-click it and click Basic Settings to open the Edit Application Pool dialog.
  5. Change .NET CLR version from .NET CLR Version v2.0.50727 to .NET CLR Version v4.0.30319 (or to No Managed Code for a .NET 10 web site).
  6. Click OK and reload the page in your browser.

Edit Application Pool dialog changing the .NET CLR version from v2.0 to v4.0
Example of changing the .NET CLR version of an application pool in IIS Manager.

Tip

The CLI configures the application pools at every install and update. Avoid manual changes to Nodinite application pools between updates, so the next run starts from the expected state.

Next Steps