4
votes

I am new to Umbraco, so I started creating a site to play a bit with it. While I had my site running on IIS express (either from VS or WebMatrix) everything worked fine. After deploying the site to IIS 7, the razor views of the front end are display in plain text, meaning that I actually see Razor syntax in the browser. Umbraco back office is working perfect though, except when I hit preview, in that case I get the plain Razor syntax again. I then try to deploy a simple new MVC project to IIS and the Razor engine worked just fine, so I guess is not a problem in IIS but in Umbraco configuration. Is there any configuration tweak I need to take care in Umbraco configuration to solve this problem? Thanks in advance for the help.

I also tried to deploy it in the IIS of my local development machine (the same in which it runs OK in IIS-express) which has the right framework and everything and I got the same cshtml display in the browser.

1
What version of the .Net Framework is you project targeting? Make sure that the same version is available on the server and also ensure that the application pool you are running the site in has the correct version of the .Net Framework set. - ProNotion
@ProNotion thanks for your idea, but everything seems to be in place. Project target is 4.5 and App Pool is running over 4.0 Framework. I tried in my local dev machine and I got the same problem - Abel Garcia

1 Answers

4
votes

After struggling a bit more with the problem I found the issue causing this behavior. After installing the starter kit a lot of files are generated in the folder and subfolders of the solution. In order to publish the solution to generate the contents of your website the VS project needs to have all these files included as project files. I found out that some views were excluded of the project and thus not being generated when publishing. I included the missing views and double check that all important files were part of the project and problem solved.