我在我的IIS上添加了一个站点但是当我尝试进入默认页面时,我收到以下错误:
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=\"Web\" /optionInfer+" />
Line 16: </compilers>
Run Code Online (Sandbox Code Playgroud)
我是否需要使用nuget安装"Microsoft.CodeDom.Providers.DotNetCompilerPlatform"软件包才能使其正常工作或是否有所不同?
您可以从web.config注释掉整个System.CodeDom部分.WebApplication项目将拥有CodeDom部分,WebSite项目将不会.评论它,它应该开始工作.
资料来源:http: //www.codeproject.com/Questions/1034471/Unable-to-run-ASP-net-pages-on-web-server
也许您有不同的版本编译器?尝试- 项目>管理NuGet软件包...>浏览(标签)>在搜索输入中将此设置为:Microsoft.CodeDom.Providers.DotNetCompilerPlatform
您可以安装或更新或卸载并安装此编译器
| 归档时间: |
|
| 查看次数: |
25934 次 |
| 最近记录: |