When i try to start my dashboard i get the error at the end of this post. Powershell Universal is working, and the web.config is based on this manual GitHub - ironmansoftware/universal-azure-actions: GitHub actions for deploying PowerShell Universal to Azure.. I have changed the PSModulePath environment configuration with the following entry, if that was not configured, Universal.psd1 could not be found by the dashboard:
<environmentVariable name="PSModulePath" value="WindowsPowerShell\Modules;D:\Program Files\WindowsPowerShell\Modules;D:\Windows\system32\WindowsPowerShell\v1.0\Modules;D:\Program Files\WindowsPowerShell\Modules\;D:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\ServiceManagement\;D:\Program Files (x86)\Microsoft SDKs\Azure\PowerShell\Storage\;D:\Program Files\Microsoft Message Analyzer\PowerShell\;D:\home\site\wwwroot\" />
I have published powershell 7 alongside universal dashboard. We want to use PS7, but it is not available in an azure app service. When i use the default powershell 5, it works fine. I cannot find why pwsh.exe is not working. Is there more logging available? Has anyone else got this to work?
The error:
dbug: UniversalAutomation.JobProcessManager[0]
Starting posh\pwsh.exe with command line -NoProfile -Command "& { [System.Reflection.Assembly]::LoadFrom('D:\home\site\wwwroot\Host.dll') | Out-Null; [UniversalHost.AgentService]::StartDashboard(53875, 12584) }"
info: UniversalAutomation.JobProcessManager[0]
Starting job using Process.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
An unhandled exception has occurred while executing the request.
System.Exception: Failed to start dashboard.
at Universal.Server.Services.DashboardProxy.Start(Dashboard dashboard) in D:\a\universal\universal\src\Universal.Server\Services\DashboardProxy.cs:line 123
at Universal.Server.Services.DashboardManager.Start(Dashboard dashboard) in D:\a\universal\universal\src\Universal.Server\Services\DashboardManager.cs:line 81
at UniversalAutomation.DashboardController.Start(Int64 id) in D:\a\universal\universal\src\Universal.Server\Controllers\DashboardController.cs:line 166
at lambda_method(Closure , Object , Object[] )
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location where exception was thrown ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Universal.Server.Middleware.RoutingMiddleware.Invoke(HttpContext httpContext, IPolicyEvaluator policyEvaluator) in D:\a\universal\universal\src\Universal.Server\Middleware\RoutingMiddleware.cs:line 113
at Swashbuckle.AspNetCore.SwaggerUI.SwaggerUIMiddleware.Invoke(HttpContext httpContext)
at Swashbuckle.AspNetCore.Swagger.SwaggerMiddleware.Invoke(HttpContext httpContext, ISwaggerProvider swaggerProvider)
at AspNetCoreRateLimit.RateLimitMiddleware`1.Invoke(HttpContext context) in D:\a\universal\universal\src\AspNetCoreRateLimit\Middleware\RateLimitMiddleware.cs:line 109
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Session.SessionMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.<Invoke>g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
Product: PowerShell Universal
Version: 1.5.15