2016-12-30 218 views
0

我正在开发一个mvc c#episerver网站。该网站在IIS 10/Win 10上加载了一个专用应用程序池等。在对代码和与布局有关的具体.cshtml做了一些更改后,我在所有共享该布局的页面上收到以下错误。IIS 10无法解析.cshtml文件

The following file could not be rendered because its extension ".cshtml" might not be supported: "~/Views/Shared/Layouts/_Root.cshtml".

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: The following file could not be rendered because its extension ".cshtml" might not be supported: "~/Views/Shared/Layouts/_Root.cshtml".

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

所有其他具有不同布局的页面都可以正常工作。此外,如果我加载与Visual Studio iisexpress的网站工作正常。

任何人都有任何想法,为什么我的IIS吓坏了?

回答

1

According to this的解决办法是清除asp.net缓存文件

删除的文件的文件夹内:

C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\

C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\

+0

我莫名其妙地没有检查到该解决方案,即使我在我的谷歌搜索结果在其绊倒。谢谢! – Agraell