0

I have a .net core 3.1 web application, specifically it is an identity server 4 app which i use to get token for other client apps. Now consider the app was running correctly and also producing tokens for clients but suddenly it terminated without any exception and this is happening many times.

1 Answers1

0

Identity server 4 events logging is available in output window while running identity server. Please check events log in output window and try to see what is going on. Moreover you can share log.

Always_a_learner
  • 1,254
  • 1
  • 8
  • 16
  • can you tell me please how to check events log in output window. As i am unable to see anything with name event in output window – M Waleed Raza May 04 '20 at 06:58
  • when identity server 4 get request all processing logged into output window of visual studio. press ctrl+Alt+O to open output window. i can share image with you but due to short reputation not able to share image. plz vote it if it helps you – Always_a_learner May 04 '20 at 07:44
  • i have opened output window but i cant'see any use full information there – M Waleed Raza May 04 '20 at 08:55
  • I can see many more lines like these 'iisexpress.exe' (CoreCLR: clrhost): Loaded 'F:\Insignia Projects\Colaraz_Revamp\src\Services\Identity\Identity.API\bin\Debug\netcoreapp3.1\System.IdentityModel.Tokens.Jwt.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. 'iisexpress.exe' (CoreCLR: clrhost): Loaded 'F:\Insignia Projects\Colaraz_Revamp\src\Services\Identity\Identity.API\bin\Debug\netcoreapp3.1\Microsoft.IdentityModel.JsonWebTokens.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled. – M Waleed Raza May 04 '20 at 08:56
  • info: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0] testIDP> User profile is available. Using 'C:\Users\kumar144\AppData\Local\ASP.NET\DataProtection-Keys' as key repository and Windows DPAPI to encrypt keys at rest. testIDP> Hosting environment: Development testIDP> Content root path: xxxxxx\testIDP testIDP> Now listening on: http://127.0.0.1:19803 testIDP> Application started. Press Ctrl+C to shut down. testIDP> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] – Always_a_learner May 04 '20 at 10:51
  • testIDP> Request starting HTTP/1.1 GET http://localhost:61777/ testIDP> info: Microsoft.AspNetCore.Hosting.Internal.WebHost[1] testIDP> Request starting HTTP/1.1 DEBUG http://localhost:61777/ 0 testIDP> Request starting HTTP/1.1 POST http://localhost:61777/connect/token application/x-www-form-urlencoded; charset=utf-8 119 testIDP> info: IdentityServer4.Hosting.IdentityServerMiddleware[0] testIDP> Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token testIDP> info: IdentityServer4.Validation.TokenRequestValidator[0] – Always_a_learner May 04 '20 at 10:51
  • User authentication failed: Incorrect Login or Password testIDP> info: IdentityServer4.Validation.TokenRequestValidator[0] testIDP> { testIDP> "ClientId": "xxx", testIDP> "ClientName": "xx", testIDP> "GrantType": "password", testIDP> "Scopes": "offline_access teAPI", testIDP> "UserName": "xxx", testIDP> "Raw": { testIDP> "username": "xxxxx", testIDP> "password": "***REDACTED***", testIDP> "grant_type": "password", testIDP> "client_id": "xxxxxxx", testIDP> "client_secret": "***REDACTED***" testIDP> } testIDP> } – Always_a_learner May 04 '20 at 10:53
  • you will log like above comments and you can see all are info log and when you will get error then error will be marked – Always_a_learner May 04 '20 at 10:53
  • ok so you are taking about logs. I am logging all the logs into log file but when application terminates and i check logs i see that there is no err logged into logs file. And also if there any exception occurs visual studio shows the exception but not in my case, i think it is not any exception which causes the application to terminate it is some other problem which i don't know – M Waleed Raza May 04 '20 at 11:15
  • is your problem encountered in production or development environment(visual studio)? – Always_a_learner May 04 '20 at 11:18
  • both in production and in development environment. In production i face the problem server has been shutdown or service is unavailable several time and in development(visual studio) i see that application terminates without any exception – M Waleed Raza May 04 '20 at 11:44