This project is read-only.

CSHTML Admin Pages Don't Render

Topics: Business Logic Layer, Controls, Themes
Feb 16, 2012 at 6:21 PM
Edited Feb 16, 2012 at 6:23 PM

I have upgraded one of my remotely hosted sites to BE 2.5.  To do this I downloaded BlogEngine.NET 2.5 (web), configured the site locally, imported data from my old 1.6 blog and then uploaded to my hosting company.

On the new site in the admin portion I get no content on Admin > Dashboard, Admin > Extensions or Admin > Settings > Themes.  The links to all three of these pages point to .cshtml pages.  I tried adding a mime type to the server for .cshtml pages set to text/xml but that resulted in an error for those three pages. so I removed it.

The app_pool on the site is set to 4.0.30319, and Network Service has write access to the App_Data folder.

A typical http log is:

2012-02-16 12:14:37 - W3SVC1050 IIS502 80 GET /admin/default.cshtml - 404 50 687 914 0 HTTP/1.1 Mozilla/5.0+(Windows+NT+6.1;+WOW64)+AppleWebKit/535.11+(KHTML,+like+Gecko)+Chrome/17.0.963.46+Safari/535.11 .AUXBLOGENGINE-96d5b379-7e1d-4dac-a6ba-1e50db561b04=B7534B5514B8322DCCBFC2FF51599B2E0EA13D3C46A868DE41504B5473C15745292FA73B1

Not sure why I would be getting a 404 when I have verified that the file is at that location.

Feb 16, 2012 at 6:46 PM

If you don't have .net 4.0 web pages installed on the server (in the GAC) you need to copy Razor DLLs from lib/razor to the ~/bin folder.

Feb 16, 2012 at 8:06 PM

This is a hosted environment, so I don't have access beyond my files and the hosting company's dashboard, so I have no idea what is actually in the GAC.  These DLLs are in my bin:

  • AjaxMin.dll
  • BlogEngine.Core.dll
  • BlogML.dll
  • Microsoft.Web.Infrastructure.dll
  • NuGet.Core.dll
  • System.Web.Helpers.dll
  • System.Web.Mvc.dll
  • System.Web.Razor.dll
  • System.Web.WebPages.Deployment.dll
  • System.Web.WebPages.dll
  • System.Web.WebPages.Razor.dll

It seems like I have covered all the bases, but maybe something is missing?

Feb 16, 2012 at 8:25 PM

It looks good to me. May be, check out this thread - the answer about "runAllManagedModulesForAllRequests".