I have been using GlassMapper for a long time, and this piece of code has always worked flawlessly; today, after playing with the children of the Home item it no longer works - even if I undo my changes.
On Internet I found no documentation for this method and its failed states - under which circumstances I should be unable to retrieve the wrapper of the website root item?
The line in question is:
var root = new SitecoreContext().GetHomeItem<MenuPage>();
This method retrieves home item using data from your current site. You should check:
Sitecore.Context.Site
Sitecore.Context.Site.StartPath
new SitecoreContext().Database
new SitecoreContext().Database.GetItem(Sitecore.Context.Site.StartPath)