I am developing an mvc c# episerver website. The site is loaded on IIS 10/Win 10 wih a dedicated application pool etc. After I did some changes in the code and on the specific .cshtml that relates to a layout I receive the following error on all the pages that share that layout.
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.
All the other pages with different Layouts work fine. Also if I load the website with visual studio iisexpress works fine.
Anyone has any idea why my IIS is freaking out?
According to this the solution is to clear the asp.net cache files
Delete the files inside the folders: