繁体   English   中英

一段时间后,ASP.NET MVC2应用程序进入错误状态

[英]ASP.NET MVC2 Application goes into error state after period of time

一段时间(未确定确切时间)后,我们的MVC应用开始出现错误,并显示以下错误消息和堆栈跟踪。

我们尚未注册任何自定义ViewEngine ...触摸web.config文件可暂时清除此错误。

我可能会缺少什么?

[InvalidOperationException: The property 'MasterLocationFormats' cannot be null or empty.]
   System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext, String[] locations, String[] areaLocations, String locationsPropertyName, String name, String controllerName, String cacheKeyPrefix, Boolean useCache, String[]& searchedLocations) +697
   System.Web.Mvc.VirtualPathProviderViewEngine.FindView(ControllerContext controllerContext, String viewName, String masterName, Boolean useCache) +288
   System.Web.Mvc.<>c__DisplayClass6.<FindView>b__4(IViewEngine e) +43
   System.Web.Mvc.ViewEngineCollection.Find(Func`2 cacheLocator, Func`2 locator) +96
   System.Web.Mvc.ViewResult.FindView(ControllerContext context) +144
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +153
   System.Web.Mvc.<>c__DisplayClass14.<InvokeActionResultWithFilters>b__11() +33
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +613
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +263
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +709
   System.Web.Mvc.Controller.ExecuteCore() +162
   System.Web.Mvc.<>c__DisplayClass8.<BeginProcessRequest>b__4() +58
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +20
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +469
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +375

一种想法可能是存储库实例正在重用。 确保为具有要填充MasterLocationFormats属性的方法的存储库创建新实例。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM