IIS 10 无法解析 .cshtml 文件
IIS 10 fails to parse .cshtml file
我正在开发一个 mvc c# episerver 网站。该站点通过专用应用程序池等加载到 IIS 10/Win 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 出问题了吗?
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\
在您看来可能是编译错误
对我来说,这是一个损坏的依赖导致了一个损坏的标签助手
我正在开发一个 mvc c# episerver 网站。该站点通过专用应用程序池等加载到 IIS 10/Win 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 出问题了吗?
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\
在您看来可能是编译错误
对我来说,这是一个损坏的依赖导致了一个损坏的标签助手