I'm getting this error when running an MVC3 site on my locahost. It is a fresh MVC3 site just newly created, the HomeController
Index
method is where it's being thrown from, on the ViewBag.Message
assignment.
public ActionResult Index()
{
ViewBag.Message = "Welcome to ASP.NET MVC!";
return View();
}
Stack trace:
at System.Runtime.CompilerServices.CallSiteBinder.BindCore[T](CallSite`1 site, Object[] args)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet](CallSite site, T0 arg0, T1 arg1)
at MVC3.Web.UI.Controllers.HomeController.Index() in C:\Users\mccarthy\Documents\Visual Studio 2010\Projects\MVC3\MVC3.Web.UI\Controllers\HomeController.cs:line 13
at lambda_method(Closure , ControllerBase , Object[] )
at System.Web.Mvc.ActionMethodDispatcher.Execute(ControllerBase controller, Object[] parameters)
at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
I have no idea what this error is and haven't seen it before. When I start up a new MVC2 project (what I've been using up until this point), the site runs just fine.
Is there some difference in how Microsoft treats security between the MVC3 and MVC2 frameworks?