I have Windows Server 2012, I configure IIS 8 to work with .cshtml files.
- I already installed ASP.NET
- I've added .cshtml to MIME types
- I have the DLL in the bin folder.
but when I open a page the code just appears like simple text.
What have I done wrong? How can I fix this so that the .cshtml is rendered as a web page?
You probably need to install ASP.Net Webpages. You can get it along with MVC4 using the standalone installer here: http://www.asp.net/mvc/mvc4
Also, did you enable ASP.Net webpages in web.config?
webPages:enabled
with valuefalse
prevents.cshtml
or.vbhtml
files in theViews
folder from being directly accessible from a web browser.