DuendeSoftware / Support

Support for Duende Software products
21 stars 0 forks source link

Deployment Issue - openid-configuration: GET 500 error #1347

Closed briantheitguy closed 3 months ago

briantheitguy commented 4 months ago

Which version of Duende IdentityServer are you using? 6.04

Which version of .NET are you using? 8.0

Describe the bug After production deployment (for testing), I get ".well-known/openid-configuration" errors and I cannot tell why.

To Reproduce Visit my site... https://www.lexican.org/ Click Login: https://www.lexican.org/authentication/login

Expected behavior I expect the page to load with no errors.

I'm new to this deployment process... I have a feeling this is simple.. at least I hope it is.

briantheitguy commented 4 months ago

I feel I have been mislead... I have been told multiple times that I didn't need a license to test in production... See attached log. "You do not have a valid license key for the Duende software. This is allowed for development and testing scenarios. If you are running in production you are required to have a licensed version. Please start a conversation with us: https://duendesoftware.com/contact" log_20240726-01.txt

briantheitguy commented 4 months ago

I just now found that Duende v6.x is not compatible with .Net 8.... fixing now.

briantheitguy commented 4 months ago

I am trying to go through the upgrade steps for Duende v6.x to v7 and running into this...

An error occurred while accessing the Microsoft.Extensions.Hosting services. Continuing without the application service provider. Error: Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.
The exception 'Method 'get_ServerSideSessions' in type 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer.ApiAuthorizationDbContext`1' from assembly 'Microsoft.AspNetCore.ApiAuthorization.IdentityServer, Version=7.0.20.0, Culture=neutral, PublicKeyToken=adb9793829ddae60' does not have an implementation.' was thrown while attempting to find 'DbContext' types. For the different patterns supported at design time, see https://go.microsoft.com/fwlink/?linkid=851728

I do not know where to go from here.

AndersAbel commented 4 months ago

Looks like there are multiple issues here.

Regarding the licensing, the product may be used freely in testing/development/staging environments but need a license for production usage. If you are preparing a production environment that is still not production usage. You may deploy an unlicensed version to a production environment to test out the production environment before launching/inviting users. The distinction is that once your users (including yorselfs starts doing actual work and not only testing you need a license.

The error message you shared which includes Microsoft.AspNetCore.ApiAuthorization.IdentityServer indicates that you have started with one of the Microsoft SPA templates that include IdentityServer. We do not recommend using those packages as they are encouraging an architecture that is not flexible and extendible. Please see https://docs.duendesoftware.com/identityserver/v7/upgrades/spa_to_duende/ for more information.

RolandGuijt commented 3 months ago

@briantheitguy Did Anders' comment put you on the right track? If there's nothing further I would like to close this issue.

RolandGuijt commented 3 months ago

Closing for now but feel free to reopen if something comes up.

briantheitguy commented 3 months ago

I have been so frustrated trying to get this to work... For the last month, I have been attempting to rebuild my app in .Net 8 and have not been successful. As Anders' link informed me, your service was just built in to the Microsoft template I started with when building this app... I do not mean to come across too negative or targeting you, I am just really frustrated.. I was at the finish line and then deployment snowballed. I had a friend tell me that .Net 8 was easier to deploy ( and it was ) but the issues that stemmed from that have cost me a lot of time...

So, I have reverted my app to .Net 7 because that works (locally in my dev environment), but I am back to fighting deployment issues ( we are using GoDaddy ).. and then I also need confirmation that I will be able to use your service in a production environment while we work out the bugs.

I know you closed this ticket, but I thought it better to reply here instead of open a new one.

RolandGuijt commented 3 months ago

I'm sorry you're going through all that frustration. Would love to help you but .NET 8 deployment issue with GoDaddy are beyond our control. Despite of that if you feel we can help you further with for example changing the project you started with the SPA template feel free to open a new issue.