IIS Add Managed Module error after moving from Windows Server 2016 to Windows Server 2022

Опубликовано: 15 Июль 2026
на канале: TT(M)O
653
3

I updated a VM running Windows Server 2016 to Windows Server 2022.

On Windows Server 2016 I was running ASP.NET 4.7.

After upgrading I get the error below if there is a C-Sharp program (I tested with a Hello, World! script) and I click the Add Managed Module option in IIS.

There was an error while performing this operation.

I do not have Visual Studio installed and would not like to uninstall it. This is not a development environment.

I was told that this is because of the Roslyn compilation.

I can't find a way to uninstall or disable this compilation and make it behave as it did in the past?

#Roslyn #.NET #IIS