Appsettings.json Options Documentation

Product: PowerShell Universal
Version: 5.5.3

Is the documentation here ( App Settings | PowerShell Universal) up to date and complete?

Recommendations from the forum seem to contradict the documentation. I am working through several issues after the upgrade, and not knowing if the forums or the documentation are correct is complicating things.

I’d say they’re mostly complete. There’s another section at Hosting | PowerShell Universal with some more settings that would be needed from initially standing up PSU. What kind of issue(s) are you having?

1 Like

I am having several issues.

The first issue was this KB0081 - unknown certificate lookup failure during git sync but the solution was to add “ExternalGitClient”: true, to the appsettings file and not the solution listed in the kb.

I was also having an issue when trying to invoke an endpoint. Error “The proxy tunnel request to proxy ‘http://restrictedproxy.xxx.xxxxx.com/’ failed with status code ‘502’.”

I opened a support ticket yesterday but haven’t heard back yet.

However, when I arrived this morning, the website wasn’t working, so I restarted the service. Now, I’m unable to get past the loading screen after logging in. I didn’t see anything useful in the log so I went trying to figure out how to enable more logging which got me to asking questions about the appsettings.json settings in this thread.

Can you describe your setup? What kind of host is PSU running on? Are you using the MSI installer, are you hosting PSU in IIS, etc.? Also, you said this happened after an upgrade. What did you upgrade from?

All of our servers are Windows Server 2022. We use the MSI installer for all, and we do not run IIS.

Our production and QA servers are running 4.4.1. Both our prod and qa systems are behind load balancers.

Each developer has a developer server configured the same as Prod and QA.

Production points to the main git branch, qa points to a branch named stage and each developer has their own branch for dev.

The problem I have described is happening on my dev server, which I just upgraded from 4.4.1 to 5.5.3.

I hope that answers your questions.

There are major changes between 4.x and 5.x regarding how PSU talks to itself internally. Have you viewed Module | PowerShell Universal to see if all of these changes to things such as the Security Model, URL, etc. have been accounted for in your customized appsettings.json file?

I added this yesterday. I was thinking it might have caused the current problem with being stuck on the loading screen.

“Api”: {
“SecurityModel”: “Permissive”,
“TrustCertificate”: true,
“URL”: “https://psudev.x.x”
}

I wouldn’t expect any of those to cause issues unless that URL value is not correct (like it’s maybe missing a port number, or has a typo).

Are you using a publicly signed cert with your PSU setup(s), or are you using self-signed/internally-signed certs?

Internally Signed Certs

If you switch the security model to Integrated, it won’t use the external URL and just the internal back channel. It may help as it effectively makes everything work like -Integrated and doesn’t require tokens or SSL certs.

Adam helped me solve the problem today. The solution was to add the local host to the “no_proxy” environment variable. I added the actual hostname of the server, the URL used for the web interface, localhost, and 127.0.0.1 and restarted the service. Then everything worked as expected.

1 Like

Wow. Glad it got figured out.