Application startup exception: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.AspNetCore.DataProtection.RegistryPolicyResolver.<>c.<.ctor>b__2_0()
at Microsoft.AspNetCore.DataProtection.RegistryPolicyResolver.ResolvePolicy()
at Microsoft.AspNetCore.DataProtection.Internal.KeyManagementOptionsSetup.Configure(KeyManagementOptions options)
at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager..ctor(IOptions1 keyManagementOptions, IActivator activator, ILoggerFactory loggerFactory)
— End of stack trace from previous location where exception was thrown —
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitIEnumerable(IEnumerableCallSite enumerableCallSite, ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.<>c__DisplayClass1_0.b__0(ServiceProviderEngineScope scope)
at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetService[T](IServiceProvider provider)
at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
Hi @TmJr75 ok first step after importing the module have you then run:-
Start-UDDashboard -Port 8082
This will prove if your machine can run universal dashboard, and will give you the poshud demo page.
So just my 2p worth you might have it, but not placed it here…but I do not see you importing the module? As in the first line should be:-
import-module -name UniversalDashboard
Also on your -pages parameter I have always fed them as an array like;-
-Pages @(
$HomePage,
$NextPage,
$AnotherPage
)
Hopefully just running that first command will confirm if it’s a code issue or machine issue.
I was running into the same issue and this is what solved it for me. When you open VS Code, the PowerShell console is loaded as an x64 application instead of an x86 application. The bottom right of VS Code shows the text “5.1” when running in x64 mode:
Click on the image with the “5.1” text and a menu appears at the top of VS Code that shows the following:
Select “Switch to: Windows PowerShell (x86)”. The PowerShell session will reload as x86 and the text will now be “5.1 (x86)” in the bottom right corner of VS Code now:
You will need to reload all of your PowerShell commands again to start your UDDashboard, but it should work this time around when starting your dashboards from VS Code.