You might get the above error if you try to access @ViewBag from within _ViewStart.cshtml. One solution is use _Layout.cshtml and point your _ViewStart.cshtml to the layout page. Everything should work fine.
// _ViewStart.cshtml page @{ Layout = "~/Views/_BasicLayout.cshtml"; <--- link to Layout Page }