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 168.179.60.203 - W3SVC1050 IIS502 98.131.142.14 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
3288DEC64C3E11534E04DF3FF1116CB75E773FA2B78080DD3DFA72A80D2EC9FAE6A6D0B3D279BE2270C88
15E8273B3728837727242F5128B36AE7D760FC89D1A9CECB8F31290C4F96970FC2CEB5FF46A8AA3D239D4D
2F753144F0BEB391E962512376E01FA7CDCB7957F785D1E647E79CD29F18DC2C06E7667D682532FE1FAC22
DACF4B8855C328BD88A3027DA0F9E7FDE5FAC82C153D8CFBE0CC38E4340944B7FEB935778A88BD52A1CF1
DA1F90236 http://agilecoder.net/

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

Coordinator
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?

Coordinator
Feb 16, 2012 at 8:25 PM

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