异常: 尝试获取 Autoscaler 类型的实例时发生激活错误,键“”
堆栈跟踪: 在 D:\Windows Azure Cloud\Samples\Windows Azure HelloWorld Sample\C#\HelloWorld_WebRole\WebRole.cs: 中的 IUSCRM.WebRole.OnStart() 处:Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRoleInternal(RoleType roleTypeEnum) 的第 43 行在 Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment.InitializeRole(RoleType roleType) 在 Microsoft.WindowsAzure.ServiceRuntime.Implementation.Loader.RoleRuntimeBridge.b__0()
内部异常: 依赖项解析失败,类型 =“Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Autoscaler”,名称 =“(无)”。异常发生时:解决时。
异常是: InvalidOperationException - 无法构造类型 String。您必须配置容器以提供此值。
在异常发生时,容器是:
解析 Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Autoscaler,(无)解析构造函数 Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Autoscaler 的参数“dataPointsStoreStorageAccountConnectionString”(System.String dataPointsStoreStorageAccountConnectionString,System.String dataPointsTableName,System.TimeSpan ruleEvaluationRate, Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Rules.IRulesStore rulesStore、Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceModel.IServiceInformationStore serviceInformationStore、Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.DataPointsCollection.IDataPointsCollectorsProvider dataPointsCollectorsProvider、Microsoft.Practices.EnterpriseLibrary .WindowsAzure.Autoscaling.IExecutionLease executionLease, Microsoft。Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Logging.ILogger 记录器,Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Scaling.IServiceManagementRequestTracker 跟踪器,Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Scaling.IScaler 缩放器)解析 System.String,(无)
来源: Microsoft.Practices.Unity
堆栈跟踪:
在 Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) 的 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable 1 resolverOverrides)
at Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, String name, IEnumerable
1 resolverOverrides) Microsoft.Practices.Unity.UnityServiceLocator.DoGetInstance(Type serviceType, String key) 在 Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) 在 c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices .ServiceLocation\ServiceLocatorImplBase.cs:第 49 行
内部异常: 无法构造类型 String。您必须配置容器以提供此值。
来源: Microsoft.Practices.Unity
堆栈跟踪: 在 Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.GuardTypeIsNonPrimitive(IBuilderContext context, SelectedConstructor selectedConstructor) 在 Microsoft.Practices.ObjectBuilder2.DynamicMethodConstructorStrategy.PreBuildUp(IBuilderContext context) 在 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) 在 Microsoft.Practices。 ObjectBuilder2.DynamicMethodBuildPlanCreatorPolicy.CreatePlan(IBuilderContext context, NamedTypeBuildKey buildKey) 在 Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) 在 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) 在 Microsoft.Practices.ObjectBuilder2.BuilderContext.NewBuildUp (NamedTypeBuildKey newBuildKey) 在 Microsoft.Practices.Unity.ObjectBuilder。NamedTypeDependencyResolverPolicy.Resolve(IBuilderContext context) at BuildUp_Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.Autoscaler(IBuilderContext ) at Microsoft.Practices.ObjectBuilder2.DynamicMethodBuildPlan.BuildUp(IBuilderContext context) at Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context)在 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext 上下文)在 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(类型 t,现有对象,字符串名称,IEnumerable`1 resolverOverrides)Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) 在 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) 在 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) 在 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) 在 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides)
在过去的两天里,我遇到了这个例外,所以请有人帮忙......