I have a fairly simple C# WebAPI2 project that runs locally but after publishing to IIS on a remote machine (Windows Server 2012 R2 Standard) the web page displays the follo
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: The compiler failed with error code -2146232576.
I faced with this problem after upgrade some NuGets and solved with below steps.
Step 1: Remove these NuGet packages from NuGet Package Console
PM> Uninstall-package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
PM> Uninstall-package Microsoft.Net.Compilers
Step 2: Add these system.codedom lines before closing tag in Web.config
PS: After a while, we removed completely, for fixed other errors.