Server Error in '/' Application ThrowKeyNotFoundException() +36
I recently downloaded the self service portal to install on a fresh SCSM secondary management server (Microsoft HTML5 SSP was installed on the same server) I followed the instructions to the letter and still ended up with the below error:
I've been beating my head against the forums trying to find anything related but I haven't had much luck.
any help would be much appreciated!
[KeyNotFoundException: The given key was not present in the dictionary.] System.ThrowHelper.ThrowKeyNotFoundException() +36 System.Collections.Generic.Dictionary`2.get_Item(TKey key) +52 Cireson.ServiceManager.Services.SettingsProvider.GetSetting(String key, Int32 tenantId) +353 Cireson.ServiceManager.Services.Implementations.LocalizationDataProvider..ctor(IDatabase database, ISettingsProvider settingsProvider) +71 lambda_method(Closure , IBuilderContext ) +503 Microsoft.Practices.ObjectBuilder2.<>c__DisplayClass1.<GetBuildMethod>b__0(IBuilderContext context) +32 Microsoft.Practices.ObjectBuilder2.BuildPlanStrategy.PreBuildUp(IBuilderContext context) +337 Microsoft.Practices.ObjectBuilder2.StrategyChain.ExecuteBuildUp(IBuilderContext context) +391 Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +453 [ResolutionFailedException: Resolution of the dependency failed, type = "Cireson.ServiceManager.Services.Interfaces.ILocalizationDataProvider", name = "(none)". Exception occurred while: Calling constructor Cireson.ServiceManager.Services.Implementations.LocalizationDataProvider(Cireson.ServiceManager.DAL.Interfaces.IDatabase database, Cireson.ServiceManager.ManagementService.Interfaces.ISettingsProvider settingsProvider). Exception is: KeyNotFoundException - The given key was not present in the dictionary. ----------------------------------------------- At the time of the exception, the container was: Resolving Cireson.ServiceManager.Services.Implementations.LocalizationDataProvider,(none) (mapped from Cireson.ServiceManager.Services.Interfaces.ILocalizationDataProvider, (none)) Calling constructor Cireson.ServiceManager.Services.Implementations.LocalizationDataProvider(Cireson.ServiceManager.DAL.Interfaces.IDatabase database, Cireson.ServiceManager.ManagementService.Interfaces.ISettingsProvider settingsProvider) ] Microsoft.Practices.Unity.UnityContainer.DoBuildUp(Type t, Object existing, String name, IEnumerable`1 resolverOverrides) +553 Microsoft.Practices.Unity.UnityContainer.Resolve(Type t, String name, ResolverOverride[] resolverOverrides) +20 Microsoft.Practices.Unity.UnityContainerExtensions.Resolve(IUnityContainer container, ResolverOverride[] overrides) +79 CiresonWebConsole.UnityConfig.RegisterComponents(IUnityContainer container) in d:\a\1\s\Cireson.WebConsole\Cireson.ServiceManager.WebConsole\App_Start\UnityConfig.cs:147 CiresonWebConsole.<>c.<.cctor>b__3_0() in d:\a\1\s\Cireson.WebConsole\Cireson.ServiceManager.WebConsole\App_Start\UnityConfig.cs:33 System.Lazy`1.CreateValue() +737 System.Lazy`1.LazyInitValue() +431 CiresonWebConsole.App_Start.UnityWebActivator.Start() in d:\a\1\s\Cireson.WebConsole\Cireson.ServiceManager.WebConsole\App_Start\UnityMvcActivator.cs:16 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +260 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146 WebActivatorEx.BaseActivationMethodAttribute.InvokeMethod() +83 WebActivatorEx.ActivationManager.RunActivationMethods(Boolean designerMode) +431 WebActivatorEx.ActivationManager.Run() +100 [InvalidOperationException: The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..] System.Web.Compilation.BuildManager.InvokePreStartInitMethodsCore(ICollection`1 methods, Func`1 setHostingEnvironmentCultures) +851 System.Web.Compilation.BuildManager.InvokePreStartInitMethods(ICollection`1 methods) +162 System.Web.Compilation.BuildManager.CallPreStartInitMethods(String preStartInitListPath, Boolean& isRefAssemblyLoaded) +130 System.Web.Compilation.BuildManager.ExecutePreAppStart() +170 System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager appManager, IApplicationHost appHost, IConfigMapPathFactory configMapPathFactory, HostingEnvironmentParameters hostingParameters, PolicyLevel policyLevel, Exception appDomainCreationException) +878 [HttpException (0x80004005): The pre-application start initialization method Run on type WebActivatorEx.ActivationManager threw an exception with the following error message: Exception has been thrown by the target of an invocation..] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +525 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +124 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +700
Best Answer
-
john_doyle Cireson Support Ninja IT Monkey ✭✭✭✭There is an issue with the 8.2 installer. Launch the Cireson Setup on the server again and when the splash screen appears, hit Browse Installer Files. That will open the file explorer. Go to InstallationFiles > DBScripts and open PopulateDefaultSettingsItem.sql with a text editor.
Change line 88 so that it reads:
(N'DefaultChangeRequestTemplate', 0, N'StandardChangeRequest'),
Save the file, and go back to the installer and complete the installation. You should just need to enter the passwords again.
You may get an error when you try to access the License Settings page. If you do, please run this SQL query against the ServiceManagement db.
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='AnalystPortalKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('AnalystPortalKey',0,getdate());
END
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='SelfServicePortalKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('SelfServicePortalKey',0,getdate());
END
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='DashboardsKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('DashboardsKey',0,getdate());
END
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='AdvancedRequestOfferingKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('AdvancedRequestOfferingKey',0,getdate());
END
5
Answers
Change line 88 so that it reads:
(N'DefaultChangeRequestTemplate', 0, N'StandardChangeRequest'),
Save the file, and go back to the installer and complete the installation. You should just need to enter the passwords again.
You may get an error when you try to access the License Settings page. If you do, please run this SQL query against the ServiceManagement db.
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='AnalystPortalKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('AnalystPortalKey',0,getdate());
END
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='SelfServicePortalKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('SelfServicePortalKey',0,getdate());
END
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='DashboardsKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('DashboardsKey',0,getdate());
END
IF NOT EXISTS (SELECT * FROM SettingsItem WHERE [Key]='AdvancedRequestOfferingKey')
BEGIN
insert SettingsItem ([Key],[TenantId],[ModifiedDate])
values ('AdvancedRequestOfferingKey',0,getdate());
END
Thanks!