Base solution for your next web application
Open Closed

IdentityServer4 and MongoDB #4523


User avatar
0
vladsd created

Just getting up and running on ASP.NET zero.

I would like my instance to use IdentityServer4 and MongoDB.

The features pages of asp.net zero lists IdentityServer4 integration, please point how to configure the use on MongoDB.

Thanks.


12 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    You can check this document for Identity Server integration <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Core#identity-server-4-integration">https://aspnetzero.com/Documents/Develo ... ntegration</a>.

    AspNet Zero doesn't support MongoDB.

  • User Avatar
    0
    vladsd created

    Thanks. One feature might be nice it to add ability to configure IS4 clients via tenant configuration, as it would change from one to another.

    Same time IS4 supports mongodb, so one can just configure support? Right?

  • User Avatar
    0
    ismcagdas created
    Support Team

    @vladsd I haven't tried this but it might be possible to use IdentityServer4 with MongoDB. Have you tried configuring it according to it's docs ?

  • User Avatar
    0
    vladsd created

    Update for all, the minute I add reference to the mongodb project for IdentityServer4 from <a class="postlink" href="https://github.com/diogodamiani/IdentityServer4.Contrib.MongoDB.git">https://github.com/diogodamiani/Identit ... ongoDB.git</a> it breaks ASP.NET Zero working with IdentityServer4

  • User Avatar
    0
    ismcagdas created
    Support Team

    @vladsd are there any error messages ?

  • User Avatar
    0
    vladsd created

    Sorry, no error messages, only in the log. Just the test fails. This one and see the log error

    class Program
        {
            private const string ServerUrlBase = "http://localhost:22742/";//62114/";
    
            static void Main(string[] args)
            {
                RunDemoAsync().Wait();
                Console.ReadLine();
            }
    
            public static async Task RunDemoAsync()
            {
                var accessToken = await GetAccessTokenViaOwnerPasswordAsync();
                await GetUsersListAsync(accessToken);
            }
    
            private static async Task<string> GetAccessTokenViaOwnerPasswordAsync()
            {
                var disco = await DiscoveryClient.GetAsync(ServerUrlBase);
    
                using (var httpHandler = new HttpClientHandler())
                {
                    httpHandler.CookieContainer.Add(new Uri(ServerUrlBase), new Cookie(MultiTenancyConsts.TenantIdResolveKey, "2")); //Set TenantId
    
                    var tokenClient = new TokenClient(disco.TokenEndpoint, "client", "def2edf7-5d42-4edc-a84a-30136c340e13",
                        //"def2edf7-5d42-4edc-a84a-30136c340e13", 
                        httpHandler);
    
                    //var tokenResponse = await tokenClient.RequestResourceOwnerPasswordAsync("alice", "alice");
                    var tokenResponse = await tokenClient.RequestResourceOwnerPasswordAsync("admin", "Vlad1!");
    
                    if (tokenResponse.IsError)
                    {
                        Console.WriteLine("Error: ");
                        Console.WriteLine(tokenResponse.Error);
                    }
    
                    Console.WriteLine(tokenResponse.Json);
    
                    return tokenResponse.AccessToken;
                }
            }
    
            private static async Task GetUsersListAsync(string accessToken)
            {
                using (var client = new HttpClient())
                {
                    client.SetBearerToken(accessToken);
    
                    var response = await client.GetAsync($"{ServerUrlBase}api/services/app/User/getUsers");
                    if (!response.IsSuccessStatusCode)
                    {
                        Console.WriteLine(response.StatusCode);
                        return;
                    }
    
                    var content = await response.Content.ReadAsStringAsync();
                    var ajaxResponse = JsonConvert.DeserializeObject<AjaxResponse<PagedResultDto<UserListDto>>>(content);
                    if (!ajaxResponse.Success)
                    {
                        throw new Exception(ajaxResponse.Error?.Message ?? "Remote service throws exception!");
                    }
    
                    Console.WriteLine();
                    Console.WriteLine("Total user count: " + ajaxResponse.Result.TotalCount);
                    Console.WriteLine();
    
                    foreach (var user in ajaxResponse.Result.Items)
                    {
                        Console.WriteLine($"### UserId: {user.Id}, UserName: {user.UserName}");
                        Console.WriteLine(user.ToJsonString(indented: true));
                    }
                }
            }
        }
    }
    

    INFO 2018-02-02 17:43:07,172 [12 ] Server4.Hosting.IdentityServerMiddleware - Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration INFO 2018-02-02 17:43:07,240 [12 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 181.0179ms 200 application/json; charset=UTF-8 INFO 2018-02-02 17:43:07,404 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://localhost:22742/.well-known/openid-configuration/jwks">http://localhost:22742/.well-known/open ... ation/jwks</a>
    INFO 2018-02-02 17:43:07,413 [3 ] Server4.Hosting.IdentityServerMiddleware - Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryKeyEndpoint for /.well-known/openid-configuration/jwks INFO 2018-02-02 17:43:07,450 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 46.1597ms 200 application/json; charset=UTF-8 INFO 2018-02-02 17:43:10,299 [12 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 POST <a class="postlink" href="http://localhost:22742/connect/token">http://localhost:22742/connect/token</a> application/x-www-form-urlencoded 52 INFO 2018-02-02 17:43:10,323 [12 ] Server4.Hosting.IdentityServerMiddleware - Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token INFO 2018-02-02 17:43:10,522 [12 ] tIdentity.ResourceOwnerPasswordValidator - Credentials validated for username: admin INFO 2018-02-02 17:43:10,580 [12 ] Server4.Validation.TokenRequestValidator - Token request validation success { "ClientId": "client", "GrantType": "password", "Scopes": "default-api", "UserName": "admin", "Raw": { "grant_type": "password", "username": "admin", "password": "REDACTED" } } INFO 2018-02-02 17:43:10,898 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 598.9385ms 200 application/json; charset=UTF-8 INFO 2018-02-02 17:43:11,830 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://localhost:22742/api/services/app/User/getUsers">http://localhost:22742/api/services/app/User/getUsers</a>
    INFO 2018-02-02 17:43:11,888 [3 ] uthentication.JwtBearer.JwtBearerHandler - Failed to validate the token eyJhbGciOiJSUzI1NiIsImtpZCI6IjEyMWJmMzJhNmIwN2NkYzRjMTIxZmFiNDVlZGZmZjQ0IiwidHlwIjoiSldUIn0.eyJuYmYiOjE1MTc2MjIxOTAsImV4cCI6MTUxNzYyNTc5MCwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyMjc0MiIsImF1ZCI6WyJodHRwOi8vbG9jYWxob3N0OjIyNzQyL3Jlc291cmNlcyIsImRlZmF1bHQtYXBpIl0sImNsaWVudF9pZCI6ImNsaWVudCIsInN1YiI6IjYiLCJhdXRoX3RpbWUiOjE1MTc2MjIxOTAsImlkcCI6ImxvY2FsIiwiaHR0cDovL3d3dy5hc3BuZXRib2lsZXJwbGF0ZS5jb20vaWRlbnRpdHkvY2xhaW1zL3RlbmFudElkIjoiMyIsInNjb3BlIjpbImRlZmF1bHQtYXBpIl0sImFtciI6WyJwd2QiXX0.PQy9dDx-h6-uajt1233kJEXgY3TCKBXjUZJ4uJ7oK6cfkhOiImWzLwHVbheDNolumS3smyi-5ZjIW4jUSt2DY8wD9oYIvlOWbi3uuaT5392hxwtxGQ8NU_345hAXBhCemiWC7jAM7v_B1NBuuOmqvfp0X0H3z7YVYCUb9D-wzKa13ynkGLUGwVbywDviPXH1ZYcL5uGG-8uRvFt3MRdiZwgAyr9x4PoG2dFwlVZLXBRvG3R4Vw1zFbm7wnbdjXR-b2pj3rg_Ud762mfB37MO70V2DWns1s6cvuNfpLBv2t1LD2gKY7Makc9gHSxqvQ6PglB5OZjtoUgOHmzpbu78oQ. Microsoft.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match 'kid': '121bf32a6b07cdc4c121fab45edfff44', token: '{"alg":"RS256","typ":"JWT","kid":"121bf32a6b07cdc4c121fab45edfff44"}.{"nbf":1517622190,"exp":1517625790,"iss":"http://localhost:22742","aud":["http://localhost:22742/resources","default-api"],"client_id":"client","sub":"6","auth_time":1517622190,"idp":"local","http://www.aspnetboilerplate.com/identity/claims/tenantId":"3","scope":["default-api"],"amr":["pwd"]}'. at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.<HandleAuthenticateAsync>d__6.MoveNext() INFO 2018-02-02 17:43:11,890 [3 ] uthentication.JwtBearer.JwtBearerHandler - Bearer was not authenticated. Failure message: IDX10501: Signature validation failed. Unable to match 'kid': '121bf32a6b07cdc4c121fab45edfff44', token: '{"alg":"RS256","typ":"JWT","kid":"121bf32a6b07cdc4c121fab45edfff44"}.{"nbf":1517622190,"exp":1517625790,"iss":"http://localhost:22742","aud":["http://localhost:22742/resources","default-api"],"client_id":"client","sub":"6","auth_time":1517622190,"idp":"local","http://www.aspnetboilerplate.com/identity/claims/tenantId":"3","scope":["default-api"],"amr":["pwd"]}'. ERROR 2018-02-02 17:43:11,959 [3 ] nostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request System.MissingMethodException: Method not found: 'System.ValueTuple2<System.String,System.String> IdentityModel.Client.DiscoveryClient.ParseUrl(System.String)'. at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationOptions.ConfigureJwtBearer(JwtBearerOptions jwtOptions) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor1.<>c__DisplayClass10_0.<Get>b__0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func1 createOptions) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.<InitializeAsync>d__42.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.<GetHandlerAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at IdentityServer4.Hosting.FederatedSignOut.FederatedSignoutAuthenticationHandlerProvider.<GetHandlerAsync>d__3.MoveNext() in C:\local\identity\server4\IdentityServer4\src\IdentityServer4\Hosting\FederatedSignOut\FederatedSignoutAuthenticationHandlerProvider.cs:line 33 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Authentication.AuthenticationService.<AuthenticateAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.<HandleAuthenticateAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.<AuthenticateAsync>d__47.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Authentication.AuthenticationService.<AuthenticateAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.<Invoke>d__7.MoveNext() INFO 2018-02-02 17:43:12,054 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 224.6711ms 500 text/html; charset=utf-8

  • User Avatar
    0
    aaron created
    Support Team

    ERROR 2018-02-02 17:43:11,959 [3 ] nostics.DeveloperExceptionPageMiddleware - An unhandled exception has occurred while executing the request System.MissingMethodException: Method not found: 'System.ValueTuple`2<System.String,System.String> IdentityModel.Client.DiscoveryClient.ParseUrl(System.String)'.

    Related issues:

  • User Avatar
    0
    vladsd created

    Not sure how .net 4.7.1 is relevant here, as I am using net.core 2.0 in all projects

  • User Avatar
    0
    bohdanq created

    Hello,

    Is there any update on the thread ? I'm experiencing same issue with Core v5.2.0 on PostgreSQL.

    Logs: INFO 2018-03-13 02:35:11,434 [10 ] Server4.Validation.TokenRequestValidator - Token request validation success { "ClientId": "client", "GrantType": "password", "Scopes": "default-api", "UserName": "admin", "Raw": { "grant_type": "password", "username": "admin", "password": "REDACTED" } } INFO 2018-03-13 02:35:11,723 [9 ] soft.AspNetCore.Hosting.Internal.WebHost - Request finished in 541.1225ms 200 application/json; charset=UTF-8 INFO 2018-03-13 02:37:13,780 [3 ] soft.AspNetCore.Hosting.Internal.WebHost - Request starting HTTP/1.1 GET <a class="postlink" href="http://localhost:22742/api/services/app/user/getUsers?MaxResultCount=1000&SkipCount=0">http://localhost:22742/api/services/app ... kipCount=0</a>
    INFO 2018-03-13 02:37:13,843 [3 ] uthentication.JwtBearer.JwtBearerHandler - Failed to validate the token eyJhbGciOiJSUzI1NiIsImtpZCI6IjEyMWJmMzJhNmIwN2NkYzRjMTIxZmFiNDVlZGZmZjQ0IiwidHlwIjoiSldUIn0.eyJuYmYiOjE1MjA5MzM3MTEsImV4cCI6MTUyMDkzNzMxMSwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoyMjc0MiIsImF1ZCI6WyJodHRwOi8vbG9jYWxob3N0OjIyNzQyL3Jlc291cmNlcyIsImRlZmF1bHQtYXBpIl0sImNsaWVudF9pZCI6ImNsaWVudCIsInN1YiI6IjEiLCJhdXRoX3RpbWUiOjE1MjA5MzM3MTEsImlkcCI6ImxvY2FsIiwic2NvcGUiOlsiZGVmYXVsdC1hcGkiXSwiYW1yIjpbInB3ZCJdfQ.szD1UdtNSA8vqjt1ARZYLM4xF3uJn9vSLglGmdVaG611TGufMUcyRWFxdWLRh_tkUVoyOzB3d7aHXzt5pn5xtitU6_EM3Wh7O8qN-5OtzV1wikp_k0xIIXGsEUATLcdIJeiFHyp0GnFVoZXuDdnq4qFlNETUFloI14GjSp3rW79bwF_VnJSxbF9T3WoKPz2eaMF4-5IssyH3vkGLeo5tGd9LOaZadvOqJx9yq0KTCYsCgkLGA8kFJfN5W1FgOXKnPeMra_qrSgse7LQWTE1OlH8n6iEpJCUkQs5UL_RCgG51L7RxmOzC3lC3UJlyLvqM8MPRYXgXDhnubsii-Zv8Lg. Microsoft.IdentityModel.Tokens.SecurityTokenSignatureKeyNotFoundException: IDX10501: Signature validation failed. Unable to match 'kid': '121bf32a6b07cdc4c121fab45edfff44', token: '{"alg":"RS256","typ":"JWT","kid":"121bf32a6b07cdc4c121fab45edfff44"}.{"nbf":1520933711,"exp":1520937311,"iss":"http://localhost:22742","aud":["http://localhost:22742/resources","default-api"],"client_id":"client","sub":"1","auth_time":1520933711,"idp":"local","scope":["default-api"],"amr":["pwd"]}'. at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature(String token, TokenValidationParameters validationParameters) at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken(String token, TokenValidationParameters validationParameters, SecurityToken& validatedToken) at Microsoft.AspNetCore.Authentication.JwtBearer.JwtBearerHandler.<HandleAuthenticateAsync>d__6.MoveNext() INFO 2018-03-13 02:37:13,846 [3 ] uthentication.JwtBearer.JwtBearerHandler - Bearer was not authenticated. Failure message: IDX10501: Signature validation failed. Unable to match 'kid': '121bf32a6b07cdc4c121fab45edfff44', token: '{"alg":"RS256","typ":"JWT","kid":"121bf32a6b07cdc4c121fab45edfff44"}.{"nbf":1520933711,"exp":1520937311,"iss":"http://localhost:22742","aud":["http://localhost:22742/resources","default-api"],"client_id":"client","sub":"1","auth_time":1520933711,"idp":"local","scope":["default-api"],"amr":["pwd"]}'. ERROR 2018-03-13 02:37:13,904 [3 ] Microsoft.AspNetCore.Server.Kestrel - Connection id "0HLC8OMHQ4PI7", Request id "0HLC8OMHQ4PI7:00000001": An unhandled exception was thrown by the application. System.MissingMethodException: Method not found: 'System.ValueTuple2<System.String,System.String> IdentityModel.Client.DiscoveryClient.ParseUrl(System.String)'. at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationOptions.ConfigureJwtBearer(JwtBearerOptions jwtOptions) at Microsoft.Extensions.Options.OptionsFactory1.Create(String name) at Microsoft.Extensions.Options.OptionsMonitor1.<>c__DisplayClass10_0.<Get>b__0() at System.Lazy1.ViaFactory(LazyThreadSafetyMode mode) at System.Lazy1.ExecutionAndPublication(LazyHelper executionAndPublication, Boolean useDefaultConstructor) at System.Lazy1.CreateValue() at Microsoft.Extensions.Options.OptionsCache1.GetOrAdd(String name, Func1 createOptions) at Microsoft.Extensions.Options.OptionsMonitor1.Get(String name) at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.<InitializeAsync>d__42.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationHandlerProvider.<GetHandlerAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at IdentityServer4.Hosting.FederatedSignOut.FederatedSignoutAuthenticationHandlerProvider.<GetHandlerAsync>d__3.MoveNext() in C:\local\identity\server4\IdentityServer4\src\IdentityServer4\Hosting\FederatedSignOut\FederatedSignoutAuthenticationHandlerProvider.cs:line 33 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Authentication.AuthenticationService.<AuthenticateAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at IdentityServer4.AccessTokenValidation.IdentityServerAuthenticationHandler.<HandleAuthenticateAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Authentication.AuthenticationHandler1.<AuthenticateAsync>d__47.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.AspNetCore.Authentication.AuthenticationService.<AuthenticateAsync>d__10.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.AspNetZeroCore.Web.Authentication.JwtBearer.JwtTokenMiddleware.<>c__DisplayClass0_0.<<UseJwtTokenMiddleware>b__0>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.<Invoke>d__6.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Cors.Infrastructure.CorsMiddleware.<Invoke>d__7.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Abp.AspNetCore.Security.AbpSecurityHeadersMiddleware.<Invoke>d__2.MoveNext() in D:\Github\aspnetboilerplate\src\Abp.AspNetCore\AspNetCore\Security\AbpSecurityHeadersMiddleware.cs:line 26 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.IISIntegration.IISMiddleware.<Invoke>d__11.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Hosting.Internal.RequestServicesContainerMiddleware.<Invoke>d__3.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Frame`1.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    Haveyou checked the related issues ?

    <a class="postlink" href="https://github.com/IdentityModel/IdentityModel2/issues/38">https://github.com/IdentityModel/Identi ... /issues/38</a> <a class="postlink" href="https://github.com/IdentityModel/IdentityModel2/issues/64">https://github.com/IdentityModel/Identi ... /issues/64</a>

  • User Avatar
    0
    bohdanq created

    Hello,

    Issue is fixed after updating Abp.ZeroCore.IdentityServer4.EntityFrameworkCore to version 3.5.0

    Many thanks.

  • User Avatar
    0
    alper created
    Support Team

    thanks for your feedback ;)