1

MVC 部分ビューで StackOverflowException が発生しています。また、Entity Framework と Unity による依存性注入も使用しています。

次のように、剣道タブストリップにアクションがある場合にのみ発生します。

@(Html.Kendo().TabStrip()
    .Name("mainNav")
    .HtmlAttributes(new { @class = "mainnav" })
    .Animation(false)
    .Items(i =>
    {
        i.Add().Text("Home").Action("Dashboard", "Home");
        i.Add().Text("Clients").Action("Manage", "Household");
        i.Add().Text("Properties").Action("Manage", "Property");
        i.Add().Text("Financial").Action("FinancialSummary", "Financial");
        i.Add().Text("Payables").Action("Manage", "PurchaseOrder")
            .Content(Html.Partial("~/Views/PurchaseOrder/_ManageContent.cshtml").ToString());
        i.Add().Text("Maintenance").Action("Manage", "WorkOrder");
        i.Add().Text("Capital Planning").Action("Index", "CapitalPlanning");
    })
)

のような単純なアクションだけであればi.Add().Text("Home")、問題なく動作します。

例外はコール スタックを表示したくなかったのですが ( 「スレッドがスタック オーバーフロー状態にあるため、式を評価できません」 )、最終的に Visual Studio のコール スタック タブを確認することを考えました。そこから、コール スタックは次のようになります。

Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp(Microsoft.Practices.ObjectBuilder2.NamedTypeBuildKey newBuildKey) + 0x1f3 bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.ObjectBuilder.NamedTypeDependencyResolverPolicy.Resolve(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xad bytes    
[Lightweight Function]  
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x47 bytes    
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0x30a bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(Microsoft.Practices.ObjectBuilder2.IBuilderContext context) + 0xcd bytes  
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.UnityContainer.DoBuildUp(System.Type t, object existing, string name, System.Collections.Generic.IEnumerable<Microsoft.Practices.Unity.ResolverOverride> resolverOverrides) + 0x285 bytes   
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.UnityContainer.DoBuildUp(System.Type t, string name, System.Collections.Generic.IEnumerable<Microsoft.Practices.Unity.ResolverOverride> resolverOverrides) + 0x4e bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.UnityContainer.Resolve(System.Type t, string name, Microsoft.Practices.Unity.ResolverOverride[] resolverOverrides) + 0x46 bytes 
Microsoft.Practices.Unity.dll!Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(Microsoft.Practices.Unity.IUnityContainer container, System.Type t, Microsoft.Practices.Unity.ResolverOverride[] overrides) + 0x71 bytes   
Unity.Mvc3.dll!Unity.Mvc3.UnityDependencyResolver.GetService(System.Type serviceType) + 0x9f bytes  
System.Web.Mvc.dll!System.Web.Mvc.DefaultControllerFactory.DefaultControllerActivator.Create(System.Web.Routing.RequestContext requestContext, System.Type controllerType) + 0x97 bytes 
System.Web.Mvc.dll!System.Web.Mvc.DefaultControllerFactory.GetControllerInstance(System.Web.Routing.RequestContext requestContext, System.Type controllerType) + 0x2b2 bytes    
System.Web.Mvc.dll!System.Web.Mvc.DefaultControllerFactory.CreateController(System.Web.Routing.RequestContext requestContext, string controllerName) + 0x15b bytes  
Kendo.Mvc.dll!Kendo.Mvc.Infrastructure.Implementation.ControllerContextCache.ControllerContextFactory(System.Web.Routing.RequestContext requestContext, string controllerName, string areaName) + 0x99 bytes        
4

1 に答える 1

0

Bootstrapper と依存性注入をトリガーするのに十分なだけであることを除けば、剣道アクションは問題とは無関係のようです。ビューの残りのほとんどは単にタブストリップ内にあるため、他に何も実行する機会がありませんでした。

ビューにエラーがスローされていましたが、実際の問題はサービスの循環参照でした。たとえば、次のようになります。

public class ServiceA : IServiceA
{
    private readonly IServiceB _svcB;

    public ServiceA(IServiceB svcB)
    {
        _svcB = svcB
    }
}

public class ServiceB : IServiceB
{
    private readonly IServiceA _svcA;

    public ServiceB(IServiceA svcA)
    {
        _svcA = svcA
    }
}

もちろん、私たちの階層はもう少し複雑だったので、例外のソースはあまり明確ではありませんでした (特に、実際のサービスではなくビューで例外がスローされたため)。

この問題を解決するには、ベース リポジトリを挿入するか、いくつかの一般的な機能を独自のサービスに移動します。しかし、本当の闘争は単にエラーが発生した理由を特定することだったので、これが誰かの時間を節約できることを願っています!

于 2013-10-21T15:41:16.613 に答える