I’m an azure n00b. I’ve created a dashboard locally and I’m trying to get it out into an Azure Web App. I’ve followed the instructions here and right now just using the example dashboard.ps1 and am getting " HTTP Error 502.5 - Process Failure" error. I selected Windows with asp.net 4.7 for my instance…Anyone seen this before?
Thanks in advance
adam
March 20, 2020, 8:13pm
#2
Can you post the web.config and dashboard.ps1 you are trying to host?
So I tried the original web.config that is in the module, and I also tried the web.config from my IIS installation I use UD for on another project. The difference I notice is that on IIS the following line points to <aspNetCore processPath=".\net472\universaldashboard.server.exe" whereas the default web.config processpath points to powershell.exe.
Here is the web.config included in the module installation.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<security>
<!-- <requestFiltering removeServerHeader ="true" /> -->
</security>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="PowerShell.exe" arguments="" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false" />
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
Currently, I’m just using the sample dashboard.ps1 file from the documentation.
Start-UDDashboard -Wait -Dashboard (
New-UDDashboard -Title "Hello, Azure" -Content {
New-UDCard -Title "Hello, Azure"
}
)
adam
March 20, 2020, 8:21pm
#4
In the web.config, try changing the arguments to: -File .\dashboard.ps1
Unfortunately did not work after a restart of the app. Here is what I have for that line just to double-check
<aspNetCore processPath="powershell.exe" arguments="-File .\dashboard.ps1" stdoutLogEnabled="true" stdoutLogFile="\\?\%home%\LogFiles\stdout" forwardWindowsAuthToken="false" />
adam
March 20, 2020, 8:36pm
#6
Here’s the web.config I’m using for https://universaldashboard-dev.azurewebsites.net/ It looks like I don’t actually have the .\
in there.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<!--
Configure your application settings in appsettings.json. Learn more at http://go.microsoft.com/fwlink/?LinkId=786380
-->
<system.webServer>
<security>
<!-- <requestFiltering removeServerHeader ="true" /> -->
</security>
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModule" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="PowerShell.exe" arguments="-File dashboard.ps1" />
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>
The other thing is that I’m importing the module at the top of my script.
Import-Module "$PSScriptRoot\UniversalDashboard.Community.psd1"
$Dashboard = . "$PSScriptRoot\poshud\dashboard.ps1"
Start-UDDashboard -Wait -Dashboard $Dashboard
That didn’t work either It has to be something with my instance then…Does this all look ok?
adam
March 20, 2020, 8:56pm
#8
Here’s mine.
You’re deploying the whole module to the directory right? This is what the site’s files look like.
Yes, I am deploying the whole module. I’ll try changing my instance to your settings.
adam
March 20, 2020, 9:01pm
#10
Hmmm yeah that looks good. Maybe it’s cuz of the .NET Core setting. Might need to update the docs…
Stil didn’t work. I’m gonna try and start over with a new web app using your settings from the start.
I got it…finally. Looking at the stdout logs I could see it wasn’t loading the module correctly. It was looking for the community module…once I fixed that it loaded. Thanks for the help!
1 Like