- ABP Framework version: v6.0.1 => 7.2.2
- UI type: Blazor
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): yes hi, I upgraded the ABP Framework from version 6.0.1 to 7.2.2, but after a user logs in, an error appears on the page. Can you help me identify where I am making a mistake?
[2023-06-12T12:40:03.464Z] Error: Volo.Abp.Http.Client.AbpRemoteCallException: Internal Server Error
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.ThrowExceptionForResponseAsync(HttpResponseMessage response) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase
1.RequestAsync(ClientProxyRequestContext requestContext)
at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase1.RequestAsync[T](ClientProxyRequestContext requestContext) at Volo.Abp.Http.Client.ClientProxying.ClientProxyBase
1.RequestAsync[T](String methodName, ClientProxyRequestTypeValue arguments)
at Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ClientProxies.AbpApplicationConfigurationClientProxy.GetAsync(ApplicationConfigurationRequestOptions options)
at Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.GetRemoteConfigurationAsync()
at Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.<GetAsync>b__19_0()
at Volo.Abp.Caching.DistributedCache2.GetOrAddAsync(TCacheKey key, Func
1 factory, Func1 optionsFactory, Nullable
1 hideErrors, Boolean considerUow, CancellationToken token)
at Volo.Abp.AspNetCore.Mvc.Client.MvcCachedApplicationConfigurationClient.GetAsync()
at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException[TResult](Task1 task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass16_0
1.<Run>b__0(Task1 t) at System.Threading.Tasks.ContinuationResultTaskFromResultTask
2.InnerInvoke()
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException[TResult](Task1 task) at Nito.AsyncEx.AsyncContext.Run[TResult](Func
1 action)
at Volo.Abp.AspNetCore.Mvc.Client.RemoteLocalizationContributor.GetResourceOrNull(String resourceName)
at Volo.Abp.AspNetCore.Mvc.Client.RemoteLocalizationContributor.GetOrNullInternal(String resourceName, String name)
at Volo.Abp.Localization.LocalizationResourceContributorList.GetOrNull(String cultureName, String name, Boolean includeDynamicContributors)
at Volo.Abp.Localization.AbpDictionaryBasedStringLocalizer.GetLocalizedStringOrNull(String name, String cultureName, Boolean tryDefaults)
at Volo.Abp.Localization.AbpDictionaryBasedStringLocalizer.GetLocalizedString(String name, String cultureName)
at Volo.Abp.UI.Navigation.DefaultMenuContributor.Configure(MenuConfigurationContext context)
at Volo.Abp.UI.Navigation.DefaultMenuContributor.ConfigureMenuAsync(MenuConfigurationContext context)
at Volo.Abp.UI.Navigation.MenuManager.GetInternalAsync(String name)
at Volo.Abp.UI.Navigation.MenuManager.GetAsync(String[] menuNames)
at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Navigation.MainMenuProvider.GetMenuAsync()
at Volo.Abp.AspNetCore.Components.Web.LeptonXTheme.Components.ApplicationLayout.SideMenu.MainHeader.MainHeader.OnInitializedAsync()
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync
10 Answer(s)
-
0
Hey,
- does it only occur in prod or is it reproducable in your dev environment as well?
- Can you share your *.csproj files from auth server and blazor? Maybe LeptonX theme version is off. Only need volo.abp related packages with versions
If the packages are up to date, it may be that there's an issue with the menu contributor. Content of that would also be interesting if it's not package version related.
Kind regards Jack
-
0
hi, When I create a project from scratch, there is no issue. We currently have a project on version 6.0.1, and when I try to upgrade it to version 7.2.2, I encounter this error. Of course, I'm sharing the details below.
AuthServer <Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="....\common.props" />
<PropertyGroup> <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> <RootNamespace>Pbys</RootNamespace> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <PreserveCompilationReferences>true</PreserveCompilationReferences> </PropertyGroup>
<ItemGroup> <Compile Remove="Logs*" /> <Content Remove="Logs*" /> <EmbeddedResource Remove="Logs*" /> <None Remove="Logs*" /> </ItemGroup>
<ItemGroup> <Content Include="Pages**.js"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> <Content Include="Pages**.css"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </Content> </ItemGroup>
<ItemGroup> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.Google" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="7.0.0" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.Twitter" Version="7.0.0" /> <PackageReference Include="DistributedLock.Redis" Version="1.0.2" /> </ItemGroup>
<ItemGroup> <PackageReference Include="Volo.Abp.Autofac" Version="7.2.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="7.2.2" /> <PackageReference Include="Volo.Abp.DistributedLocking" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Application" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.HttpApi" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.OpenIddict" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.Impersonation" Version="7.2.2" /> <PackageReference Include="Volo.Saas.Host.Application.Contracts" Version="7.2.2" /> <ProjectReference Include="..\Pbys.EntityFrameworkCore\Pbys.EntityFrameworkCore.csproj" /> </ItemGroup>
<ItemGroup> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX" Version="2.2.-" /> </ItemGroup>
</Project>
Blazor <Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="....\common.props" />
<PropertyGroup> <TargetFramework>net7.0</TargetFramework> <Nullable>enable</Nullable> <AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles> <MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish> <PreserveCompilationReferences>true</PreserveCompilationReferences> </PropertyGroup>
<ItemGroup> <PackageReference Include="AspNetCore.HealthChecks.UI" Version="7.0.0-rc2.6" /> <PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="7.0.0-rc2.6" /> <PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="7.0.0-rc2.6" /> <PackageReference Include="Serilog.AspNetCore" Version="5.0.0" /> <PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" /> <PackageReference Include="Blazorise.Bootstrap5" Version="1.2.0" /> <PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.2.0" /> <PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0" /> <PackageReference Include="DistributedLock.Redis" Version="1.0.2" /> </ItemGroup>
<ItemGroup> <PackageReference Include="Volo.Abp.Caching.StackExchangeRedis" Version="7.2.2" /> <PackageReference Include="Volo.Abp.DistributedLocking" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Autofac" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Swashbuckle" Version="7.2.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="7.2.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.Client" Version="7.2.2" /> <PackageReference Include="Volo.Abp.AspNetCore.Authentication.OpenIdConnect" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Http.Client.Web" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Http.Client.IdentityModel.Web" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Admin.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Account.Pro.Public.Web.Impersonation" Version="7.2.2" /> <PackageReference Include="Volo.Abp.AuditLogging.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Identity.Pro.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.OpenIddict.Pro.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.LanguageManagement.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Saas.Host.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.TextTemplateManagement.Blazor.Server" Version="7.2.2" /> <PackageReference Include="Volo.Abp.Gdpr.Blazor.Server" Version="7.2.2" /> <ProjectReference Include="..\Pbys.HttpApi.Client\Pbys.HttpApi.Client.csproj" /> <PackageReference Include="Volo.CmsKit.Pro.Admin.Blazor.Server" Version="7.2.2" /> </ItemGroup>
<ItemGroup> <PackageReference Include="Volo.Abp.AspNetCore.Components.Server.LeptonXTheme" Version="2.2.-" /> <PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonX" Version="2.2.-" /> </ItemGroup>
<ItemGroup> <Compile Remove="Logs*" /> <Content Remove="Logs*" /> <EmbeddedResource Remove="Logs*" /> <None Remove="Logs*" /> </ItemGroup>
<ItemGroup> <None Update="Pages**.js"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> <None Update="Pages**.css"> <CopyToOutputDirectory>Always</CopyToOutputDirectory> </None> </ItemGroup>
</Project>
-
0
Seems good to me. Can you share logs of the api? your logs seem like they come from blazor
-
0
Is it okay if I send an email with the full content of the logs?
-
0
Is it okay if I send an email with the full content of the logs?
sure. please send it to kontakt@chrobyte.de
-
0
Did you receive the email I sent?
-
0
Did you receive the email I sent?
yes :)
-
0
Okay we have two issues here: (I opened the log file in VS Code and searched for
[Err]
[ERR] One or more errors occurred. (ps (Parameter 'Expected [lock] to be a field or gettable property on [<>f__AnonymousType0`2[[StackExchange.Redis.RedisKey, StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46],[StackExchange.Redis.RedisValue, StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46]]]')) System.AggregateException: One or more errors occurred. (ps (Parameter 'Expected [lock] to be a field or gettable property on [<>f__AnonymousType0`2[[StackExchange.Redis.RedisKey, StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46],[StackExchange.Redis.RedisValue, StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46]]]')) ---> System.ArgumentException: ps (Parameter 'Expected [lock] to be a field or gettable property on [<>f__AnonymousType0`2[[StackExchange.Redis.RedisKey, StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46],[StackExchange.Redis.RedisValue, StackExchange.Redis, Version=2.0.0.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46]]]') at StackExchange.Redis.LuaScript.ExtractParameters(Object ps, Nullable`1 keyPrefix, RedisKey[]& keys, RedisValue[]& args) in /_/src/StackExchange.Redis/LuaScript.cs:line 117 at StackExchange.Redis.LuaScript.EvaluateAsync(IDatabaseAsync db, Object ps, Nullable`1 withKeyPrefix, CommandFlags flags) in /_/src/StackExchange.Redis/LuaScript.cs:line 161 at StackExchange.Redis.RedisDatabase.ScriptEvaluateAsync(LuaScript script, Object parameters, CommandFlags flags) in /_/src/StackExchange.Redis/RedisDatabase.cs:line 1245 at Medallion.Threading.Redis.Primitives.RedisScript`1.ExecuteAsync(IDatabaseAsync database, TArgument argument, Boolean fireAndForget) in /_/DistributedLock.Redis/Primitives/RedisScript.cs:line 29 at Medallion.Threading.Redis.Primitives.RedisMutexPrimitive.ReleaseAsync(IDatabaseAsync database, Boolean fireAndForget) in /_/DistributedLock.Redis/Primitives/RedisMutexPrimitive.cs:line 36 at Medallion.Threading.Redis.RedLock.RedLockRelease.ReleaseAsync() in /_/DistributedLock.Redis/RedLock/RedLockRelease.cs:line 69 --- End of inner exception stack trace --- at Medallion.Threading.Redis.RedLock.RedLockRelease.ReleaseAsync() in /_/DistributedLock.Redis/RedLock/RedLockRelease.cs:line 78 at Medallion.Threading.Redis.RedLock.RedLockHandle.DisposeAsync() in /_/DistributedLock.Redis/RedLock/RedLockHandle.cs:line 52 at Volo.Abp.BackgroundJobs.BackgroundJobWorker.DoWorkAsync(PeriodicBackgroundWorkerContext workerContext) at Volo.Abp.BackgroundWorkers.AsyncPeriodicBackgroundWorkerBase.DoWorkAsync(CancellationToken cancellationToken)
Do you have any
AsyncPeriodicBackgroundWorker
in place?other issue (which I think is the one relevant for this issue:
2023-06-13 09:51:49.821 +03:00 [ERR] Exception occurred while processing message. System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://localhost:44378/.well-known/openid-configuration'. ---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'https://localhost:44378/.well-known/openid-configuration'. ---> System.Net.Http.HttpRequestException: Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı. (localhost:44378) ---> System.Net.Sockets.SocketException (10061): Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.SendAsyncAndRetryOnNetworkError(HttpClient httpClient, Uri uri) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context) 2023-06-13 09:51:49.828 +03:00 [ERR] An unhandled exception has occurred while executing the request. System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://localhost:44378/.well-known/openid-configuration'. ---> System.IO.IOException: IDX20804: Unable to retrieve document from: 'https://localhost:44378/.well-known/openid-configuration'. ---> System.Net.Http.HttpRequestException: Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı. (localhost:44378) ---> System.Net.Sockets.SocketException (10061): Hedef makine etkin olarak reddettiğinden bağlantı kurulamadı. at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken) at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token) at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|281_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) --- End of inner exception stack trace --- at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(QueueItem queueItem) at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.HttpConnectionWaiter`1.WaitForConnectionAsync(Boolean async, CancellationToken requestCancellationToken) at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken) at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.SendAsyncAndRetryOnNetworkError(HttpClient httpClient, Uri uri) at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel) --- End of inner exception stack trace --- at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.HandleAuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.AuthenticateAsync() at Microsoft.AspNetCore.Authentication.AuthenticationService.AuthenticateAsync(HttpContext context, String scheme) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context) at Volo.Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Localization.RequestLocalizationMiddleware.Invoke(HttpContext context) at Microsoft.AspNetCore.RequestLocalization.AbpRequestLocalizationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) at Microsoft.AspNetCore.Builder.UseMiddlewareExtensions.<>c__DisplayClass6_1.<<UseMiddlewareInterface>b__1>d.MoveNext() --- End of stack trace from previous location --- at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddlewareImpl.Invoke(HttpContext context)
I can see in the logs that you use openiddict. Can you check your configuration and/ or send me the auth server logs?
If those things also do not clarify what happens here, I would need to see the code to debug through it.
Kind regards Jack
-
0
I sent e-mail.
-
0
Something's off here:
First log is from API Host and it's searching the openid configuration on
https://localhost:44378/.well-known/openid-configuration
- so port 44378The second log comes from Auth Server and it has lines like this:
2023-06-12 17:08:39.433 +03:00 [INF] Request starting HTTP/1.1 GET https://localhost:44335/.well-known/openid-configuration - -
And Auth Server returns responses like this:
2023-06-12 17:08:42.869 +03:00 [INF] The response was successfully returned as a JSON document: { "issuer": "https://localhost:44335/", "authorization_endpoint": "https://localhost:44335/connect/authorize", "token_endpoint": "https://localhost:44335/connect/token", "introspection_endpoint": "https://localhost:44335/connect/introspect", "end_session_endpoint": "https://localhost:44335/connect/logout", "revocation_endpoint": "https://localhost:44335/connect/revocat", "userinfo_endpoint": "https://localhost:44335/connect/userinfo", "device_authorization_endpoint": "https://localhost:44335/device", "jwks_uri": "https://localhost:44335/.well-known/jwks", "grant_types_supported": [ "authorization_code", "implicit", "password", "client_credentials", "refresh_token", "urn:ietf:params:oauth:grant-type:device_code", "LinkLogin", "Impersonation" ], "response_types_supported": [ "code", "code id_token", "code id_token token", "code token", "id_token", "id_token token", "token", "none" ], "response_modes_supported": [ "form_post", "fragment", "query" ], "scopes_supported": [ "openid", "offline_access", "email", "profile", "phone", "roles", "address", "Pbys" ], "claims_supported": [ "aud", "exp", "iat", "iss", "sub" ], "id_token_signing_alg_values_supported": [ "RS256" ], "code_challenge_methods_supported": [ "S256" ], "subject_types_supported": [ "public" ], "token_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "introspection_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "revocation_endpoint_auth_methods_supported": [ "client_secret_basic", "client_secret_post" ], "claims_parameter_supported": false, "request_parameter_supported": false, "request_uri_parameter_supported": false, "authorization_response_iss_parameter_supported": true }.
May it be that your auth server runs under port 44335 and that your api host has something like this in it's appsettings.json:
"AuthServer": { "Authority": "https://localhost:44378", ... },
If yes, change it to
"AuthServer": { "Authority": "https://localhost:44335", ... },
It's also strange that the auth server also has those errors with redis.
If above does not help, can you share the code?
Kind regards Jack