Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CodeDom Provider could not be located on IIS7

Tags:

iis

I have added a site on my IIS but when I try to get to the default page, I get the following 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=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" could not be located.

Source Error: 


Line 12:   <system.codedom>
Line 13:     <compilers>
Line 14:       <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
Line 15:       <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
Line 16:     </compilers> 

Do I need to install the "Microsoft.CodeDom.Providers.DotNetCompilerPlatform" package with nuget to make it works or is it something different ?

like image 778
Stan Avatar asked Mar 24 '16 08:03

Stan


1 Answers

You can comment out the entire System.CodeDom section from web.config. WebApplication projects will have the CodeDom section, WebSite projects wont. Comment it out and it should start working.

Source: http://www.codeproject.com/Questions/1034471/Unable-to-run-ASP-net-pages-on-web-server

like image 198
Saharsh Avatar answered Sep 30 '22 21:09

Saharsh