Parser Error Message when loading ASP .NET Web Application

Matthew Paisley 0 Reputation points
2023-12-18T19:16:45.5433333+00:00

I have a C# .NET Web Application the runs fine in Windows 2022 Debugger. When I deploy to IIS Manager and attempt to load the page I get:

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: The CodeDom provider type "Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.

Source Error:

Line 25: <system.codedom>

Line 26: <compilers>

Line 27: <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" compilerOptions="/langversion:default /nowarn:1659;1699;1701;612;618" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

Line 28: <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" compilerOptions="/langversion:default /nowarn:41008,40000,40008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=4.1.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />

Line 29: </compilers>

Source File: C:\WebDemos\CodeHandBook.Sample.FileUpload\web.config Line: 27

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.9037.0

I have tried to load the package with the nuget package manager console, but tis doesn't help. Any ideas will be most appreciated.

Thanks,

Matt Paisley

Windows development | Internet Information Services
Developer technologies | ASP.NET | Other
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.