abp icon indicating copy to clipboard operation
abp copied to clipboard

Identity Server (separated) error - http failure response

Open ruby0602 opened this issue 6 years ago • 11 comments

the ui is angular, if step into the login page, it has the error “Http failure response for https://localhost:44309/.well-known/openid-configuration”,how can I solve the problem, thanks in advance. image

ruby0602 avatar Sep 28 '20 12:09 ruby0602

You can check the logs of the application(https://localhost:44309 ).

maliming avatar Sep 28 '20 12:09 maliming

You can check the logs of the application(https://localhost:44309 ).

I only found the logs in the HttpApi.Host project

ruby0602 avatar Sep 29 '20 03:09 ruby0602

so, what is the error message in the log?

maliming avatar Sep 29 '20 14:09 maliming

so, what is the error message in the log?

there is no error about identityserver, image

ruby0602 avatar Sep 30 '20 01:09 ruby0602

hi

  • Steps needed to reproduce the problem.

maliming avatar Oct 04 '20 09:10 maliming

I have solved the problem with generating the solution by none-seprated identity server

ruby0602 avatar Oct 06 '20 12:10 ruby0602

I have exactly the same probleme, just when i publish my IDP to IIS .

The senario is

Tierd App :

"ConnectionStrings": {

"Default": "Server=.................Database=MyDefaultDB;Trusted_Connection=True;",

"AbpIdentityServer": "....................Database=IdpDB;Trusted_Connection=True;",
"AbpPermissionManagement": "....................Database=IdpDB;Trusted_Connection=True;",
"AbpAuditLogging": "....................Database=IdpDB;Trusted_Connection=True;",

},

in debugging mode every thing work fine, but when i publish to IIS i got the : error

2020-11-05 14:41:53.306 +01:00 [DBG] Request path /.well-known/openid-configuration matched to endpoint type Discovery 2020-11-05 14:41:53.875 +01:00 [DBG] Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryEndpoint 2020-11-05 14:41:53.875 +01:00 [INF] Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration 2020-11-05 14:41:53.876 +01:00 [DBG] Start discovery request 2020-11-05 14:41:55.655 +01:00 [ERR] Failed executing DbCommand (79ms) [Parameters=[@__ef_filter__p_0='?' (DbType = Boolean)], CommandType='"Text"', CommandTimeout='30'] SELECT [i].[Id], [i].[ConcurrencyStamp], [i].[CreationTime], [i].[CreatorId], [i].[DeleterId], [i].[DeletionTime], [i].[Description], [i].[DisplayName], [i].[Emphasize], [i].[Enabled], [i].[ExtraProperties], [i].[IsDeleted], [i].[LastModificationTime], [i].[LastModifierId], [i].[Name], [i].[Properties], [i].[Required], [i].[ShowInDiscoveryDocument], [i0].[IdentityResourceId], [i0].[Type] FROM [IdentityServerIdentityResources] AS [i] LEFT JOIN [IdentityServerIdentityClaims] AS [i0] ON [i].[Id] = [i0].[IdentityResourceId] WHERE (@__ef_filter__p_0 = CAST(1 AS bit)) OR ([i].[IsDeleted] <> CAST(1 AS bit)) ORDER BY [i].[Id], [i0].[IdentityResourceId], [i0].[Type] 2020-11-05 14:41:55.704 +01:00 [ERR] An exception occurred while iterating over the results of a query for context type 'Volo.Abp.IdentityServer.EntityFrameworkCore.IdentityServerDbContext'. Microsoft.Data.SqlClient.SqlException (0x80131904): Nom d'objet 'IdentityServerIdentityResources' non valide. at Microsoft.Data.SqlClient.SqlCommand.<>c.b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- 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 where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync() ClientConnectionId:82e26367-e622-4850-92f5-f3e8c67a7090 Error Number:208,State:1,Class:16 Microsoft.Data.SqlClient.SqlException (0x80131904): Nom d'objet 'IdentityServerIdentityResources' non valide. at Microsoft.Data.SqlClient.SqlCommand.<>c.b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- 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 where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync() ClientConnectionId:82e26367-e622-4850-92f5-f3e8c67a7090 Error Number:208,State:1,Class:16 2020-11-05 14:41:55.732 +01:00 [INF] {"Details":"Microsoft.Data.SqlClient.SqlException (0x80131904): Nom d'objet 'IdentityServerIdentityResources' non valide.\r\n at Microsoft.Data.SqlClient.SqlCommand.<>c.b__164_0(Task1 result)\r\n at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()\r\n at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj)\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.InitializeReaderAsync(DbContext _, Boolean result, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.SqlServer.Storage.Internal.SqlServerExecutionStrategy.ExecuteAsync[TState,TResult](TState state, Func4 operation, Func4 verifySucceeded, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable1.AsyncEnumerator.MoveNextAsync()\r\n at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)\r\n at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable1 source, CancellationToken cancellationToken)\r\n at Volo.Abp.Domain.Repositories.EntityFrameworkCore.EfCoreRepository2.GetListAsync(Boolean includeDetails, CancellationToken cancellationToken)\r\n at Castle.DynamicProxy.AsyncInterceptorBase.ProceedAsynchronous[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAbpMethodInvocationAdapterWithReturnValue1.ProceedAsync()\r\n at Volo.Abp.Uow.UnitOfWorkInterceptor.InterceptAsync(IAbpMethodInvocation invocation)\r\n at Volo.Abp.Castle.DynamicProxy.CastleAsyncAbpInterceptorAdapter1.InterceptAsync[TResult](IInvocation invocation, IInvocationProceedInfo proceedInfo, Func3 proceed)\r\n at Volo.Abp.IdentityServer.ResourceStore.GetAllResourcesAsync()\r\n at IdentityServer4.Stores.IResourceStoreExtensions.GetAllEnabledResourcesAsync(IResourceStore store)\r\n at IdentityServer4.ResponseHandling.DiscoveryResponseGenerator.CreateDiscoveryDocumentAsync(String baseUrl, String issuerUri)\r\n at IdentityServer4.Endpoints.DiscoveryEndpoint.ProcessAsync(HttpContext context)\r\n at IdentityServer4.Hosting.IdentityServerMiddleware.Invoke(HttpContext context, IEndpointRouter router, IUserSession session, IEventService events)\r\nClientConnectionId:82e26367-e622-4850-92f5-f3e8c67a7090\r\nError Number:208,State:1,Class:16","Category":"Error","Name":"Unhandled Exception","EventType":"Error","Id":3000,"Message":"Nom d'objet 'IdentityServerIdentityResources' non valide.","ActivityId":"80000022-0002-ed00-b63f-84710c7967bb","TimeStamp":"2020-11-05T13:41:55.0000000Z","ProcessId":18560,"LocalIpAddress":"::1:44318","RemoteIpAddress":"::1","$type":"UnhandledExceptionEvent"} 2020-11-05 14:41:55.732 +01:00 [FTL] Unhandled exception: Nom d'objet 'IdentityServerIdentityResources' non valide. Microsoft.Data.SqlClient.SqlException (0x80131904): Nom d'objet 'IdentityServerIdentityResources' non valide. at Microsoft.Data.SqlClient.SqlCommand.<>c.b__164_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()

it seems like he loste th dbcontext to get info from :

https://localhost:44318/.well-known/openid-configuration

th wiered things is : i'm able to log by hiting the login buton from IDP page ( https://localhost:44318/)

FYI :

i'm publishing my IDP / HostApi / Blazor to the same IIS pool .

Can you help please........ @maliming , @realLiangshiwei

aelhadi avatar Nov 05 '20 14:11 aelhadi

@aelhadi Please create a new issue.

maliming avatar Nov 06 '20 00:11 maliming

@aelhadi / @maliming - how was this issue resolved? still getting the same error my side.

DenverSearle avatar Sep 02 '21 16:09 DenverSearle

Clean your browser cache

aelhadi avatar Sep 02 '21 16:09 aelhadi

I was hesitant clearing my browser cache, so instead I simply navigated to (IDS4) https://localhost:44372/...

then logged in, and then logged out.

Now the UI works again.

DenverSearle avatar Sep 02 '21 17:09 DenverSearle