title: How to resolve HTTP 500 error in publishing dot net core Identity Server4 web application
body: <p>I  am working on a .Net Core5.0 project with Microservices, RabbitMQ and IdentityServer4 for Authentication/Authorization with OpenID Connect; and now trying to publish it on EC2 AWS instance (Windows server 2019 Datacenter).
  However Publishing is not happening at all. Getting HTTP 500 Error (find screen shot)
  Here is what i have done for publishing:</p>
  <ul>
  <li>First I Created a Self signed certificate using OpenSSL for Identity server signing credential and then placed it into the Cert-Store of server machine.</li>
  <li>For test purpose, tried publishing only my MVC Client application and the IDS4 application.</li>
  <li>Changed Environment variable from Dev to Production.</li>
  <li>For Client App, Selected default IIS Deploy as SSL certificate</li>
  <li>For IDS4 App, Selected the Self signed certificate which I created earlier.</li>
  </ul>
  <p><strong>Find IDS4 App Startup.cs below</strong></p>
  <pre><code>namespace IdentityServer4.Server
  {
      public class Startup
      {
          public IWebHostEnvironment Environment { get; }
          public IConfiguration Configuration { get; }
          public Startup(IWebHostEnvironment environment, IConfiguration configuration)
          {
              Environment = environment;
              Configuration = configuration;
          }
          // This method gets called by the runtime. Use this method to add services to the container.
          // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
          public void ConfigureServices(IServiceCollection services)
          {
              services.AddControllersWithViews();
  
              /****Register asp.net core Identity DBConetexts***/
              var key = AesOperation.AesKey;
              var encryptedString = Configuration[&quot;DbContextSettings:MasterDbConnectionString&quot;];
              var decryptedString = AesOperation.DecryptString(key, encryptedString);
              var masterConnectionString = decryptedString;
  
              var idenConnectionString = Configuration[&quot;DbContextSettings:IdentityConnectionString&quot;];
              var userConnectionString = Configuration[&quot;DbContextSettings:UserConnectionString&quot;];
              var dbPassword = Configuration[&quot;DbContextSettings:DbPassword&quot;];
              var builder = new NpgsqlConnectionStringBuilder(idenConnectionString)
              {
                  Password = dbPassword
              };
              var userBuilder = new NpgsqlConnectionStringBuilder(userConnectionString)
              {
                  Password = dbPassword
              };
              var masterBuilder = new NpgsqlConnectionStringBuilder(masterConnectionString)
              {
                  Password = dbPassword
              };
  
              services.AddDbContext&lt;MembershipDBContext&gt;(opts =&gt; opts.UseNpgsql(builder.ConnectionString));
              services.AddDbContext&lt;UserDBContext&gt;(opts =&gt; opts.UseNpgsql(userBuilder.ConnectionString));
              services.AddDbContext&lt;MasterDbContext&gt;(opts =&gt; opts.UseNpgsql(masterBuilder.ConnectionString));
  
              services.AddIdentity&lt;MembershipUser, MembershipRole&gt;(options =&gt;
              {
                  options.Password.RequiredLength = 8;
                  options.User.AllowedUserNameCharacters = &quot;abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._@+ &quot;;
                  options.SignIn.RequireConfirmedEmail = false;
                  options.User.RequireUniqueEmail = false;
              }).AddRoles&lt;MembershipRole&gt;().AddEntityFrameworkStores&lt;MembershipDBContext&gt;()
              .AddDefaultTokenProviders();
  
              /****Identity Server implementation with asp.net core Identity***/
  
              var idsServerConnectionString = Configuration[&quot;DbContextSettings:IdentityServer4ConnectionString&quot;];
              var migrationAssembly = typeof(Startup).GetTypeInfo().Assembly.GetName().Name;
              //var userConnectionString = Configuration[&quot;DbContextSettings:UserConnectionString&quot;];
              var idsServerdbPassword = Configuration[&quot;DbContextSettings:DbPassword&quot;];
              var idsServerbuilder = new NpgsqlConnectionStringBuilder(idsServerConnectionString)
              {
                  Password = dbPassword
              };
              var idBuilder = services.AddIdentityServer(options =&gt;
                {
                    options.Events.RaiseErrorEvents = true;
                    options.Events.RaiseInformationEvents = true;
                    options.Events.RaiseFailureEvents = true;
                    options.Events.RaiseSuccessEvents = true;
                    options.UserInteraction.LoginUrl = &quot;/Account/Login&quot;;
                    options.UserInteraction.LogoutUrl = &quot;/Account/Login&quot;;
                    options.Authentication = new AuthenticationOptions()
                    {
                        CookieLifetime = TimeSpan.FromMinutes(10), // ID server cookie timeout set to 10 hours
                        CookieSlidingExpiration = true
                    };
                })
              //.AddDeveloperSigningCredential()
              .AddConfigurationStore(options =&gt;
              {
                  options.ConfigureDbContext = b =&gt; b.UseNpgsql(idsServerbuilder.ConnectionString, sql =&gt; sql.MigrationsAssembly(migrationAssembly));
              })
              .AddOperationalStore(options =&gt;
              {
                  options.ConfigureDbContext = b =&gt; b.UseNpgsql(idsServerbuilder.ConnectionString, sql =&gt; sql.MigrationsAssembly(migrationAssembly));
                  options.EnableTokenCleanup = true;
              }).AddAspNetIdentity&lt;MembershipUser&gt;()
              .AddProfileService&lt;ProfileService&gt;();
  
              X509Certificate2 cert = null;
              using (var certStore = new X509Store(StoreName.My, StoreLocation.LocalMachine))
              {
                  certStore.Open(OpenFlags.ReadOnly);
                  var certCollection = certStore.Certificates.Find(
                      X509FindType.FindByThumbprint,
                      // Change this with the thumbprint of your certifiacte
                      &quot;f5ed3fcb7da5a1e7dd123c5ed8f07a93ab6312d5&quot;,
                      false);
  
                  if (certCollection.Count &gt; 0)
                  {
                      cert = certCollection[0];
                  }
              }
  
              if (Environment.IsDevelopment())
              {
                  //idBuilder.AddSigningCredential(certificate);
                  idBuilder.AddDeveloperSigningCredential();
              }
              else
              {
                  idBuilder.AddSigningCredential(cert);
              }
           
          }        
          
          public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
          {        
              if (Environment.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();
              }
  
              app.UseStaticFiles();
              app.UseRouting();
              app.UseIdentityServer();
              app.UseAuthorization();
              app.UseEndpoints(endpoints =&gt;
              {
                  endpoints.MapDefaultControllerRoute();
              });
          }
      }
  }
  </code></pre>
  <p><strong>Find MVC Client App startup.cs below:</strong></p>
  <pre><code>
  public void ConfigureServices(IServiceCollection services)
          {
              services.AddMvc(options =&gt;
              {
                  var policy = new AuthorizationPolicyBuilder()
                      .RequireAuthenticatedUser()
                      .Build();
                  options.Filters.Add(new AuthorizeFilter(policy));
              }).SetCompatibilityVersion(CompatibilityVersion.Version_3_0);
              services.AddScoped&lt;RenewToken&gt;();
              services.AddAuthorization(options =&gt;
              {
                  //For Master Microservice
                  options.AddPolicy(&quot;S1CreatePolicy&quot;, policy =&gt; policy.RequireAssertion(context =&gt; AuthorizeAccess(context, &quot;S1RC&quot;, &quot;S1UC&quot;)));
              });
              services.AddControllersWithViews();
              JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
  
              services.AddAuthentication(options =&gt;
              {
                  options.DefaultScheme = &quot;Cookies&quot;;
                  options.DefaultChallengeScheme = &quot;oidc&quot;;
              }).AddCookie(&quot;Cookies&quot;, options =&gt;
              {
                  options.Cookie.Name = &quot;Cookies&quot;;
                  options.ExpireTimeSpan = TimeSpan.FromMinutes(10);
                  options.SlidingExpiration = true;
              }).AddOpenIdConnect(&quot;oidc&quot;, options =&gt;
                  {
                      options.Authority = Configuration.GetSection(&quot;API:IDS4&quot;).Value;
                      options.SignInScheme = &quot;Cookies&quot;;
                      options.SignedOutRedirectUri = Configuration.GetSection(&quot;API:WebClient&quot;).Value + &quot;/signout-callback-oidc&quot;;
                      options.RequireHttpsMetadata = false;
                      options.ClientId = &quot;mvc&quot;;
                      options.ClientSecret = &quot;*******&quot;;
                      options.ResponseType = &quot;code&quot;;
                      options.UsePkce = true;
                      options.Scope.Add(&quot;profile&quot;);
                      options.Scope.Add(&quot;mcApi&quot;);
                      options.Scope.Add(&quot;offline_access&quot;);
                      options.GetClaimsFromUserInfoEndpoint = true;
                      options.SaveTokens = true;
                      options.Events.OnRedirectToIdentityProvider = context =&gt;
                      {
                          context.ProtocolMessage.Prompt = &quot;login&quot;;
                          return Task.CompletedTask;
                      };
  
                      options.Events = new OpenIdConnectEvents
                      {
                          OnRemoteFailure = (context) =&gt;
                          {
                              context.Response.Redirect(&quot;/&quot;);
                              context.HandleResponse();
  
                              return Task.CompletedTask;
                          }
                      };
                      options.TokenValidationParameters = new TokenValidationParameters
                      {
                          RoleClaimType = JwtClaimTypes.Role
                      };
                  });
          }
  </code></pre>
  <p>To get more clarity into the error, I checked the Logs in the published folder and found the following</p>
  <p><strong><strong>Log from Client-App below:</strong></strong></p>
  <pre><code>info: Microsoft.Hosting.Lifetime[0]
        Application started. Press Ctrl+C to shut down.
  info: Microsoft.Hosting.Lifetime[0]
        Hosting environment: Production
  info: Microsoft.Hosting.Lifetime[0]
        Content root path: C:\inetpub\wwwroot\clientapp
  fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[1]
        An unhandled exception has occurred while executing the request.
        System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
         ---&gt; System.IO.IOException: IDX20804: Unable to retrieve document from: 'System.String'.
         ---&gt; System.Net.Http.HttpRequestException: No such host is known. (idsapp:44396)
         ---&gt; System.Net.Sockets.SocketException (11001): No such host is known.
           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.&lt;ConnectAsync&gt;g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)
           at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
           --- End of inner exception stack trace ---
           at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, 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.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
           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.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
           at Microsoft.AspNetCore.Mvc.ChallengeResult.ExecuteResultAsync(ActionContext context)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAlwaysRunResultFilters&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeFilterPipelineAsync&gt;g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
           at Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
           at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.&lt;Invoke&gt;g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
  fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware[3]
        An exception was thrown attempting to execute the error handler.
        System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
           at Microsoft.IdentityModel.Protocols.ConfigurationManager`1.GetConfigurationAsync(CancellationToken cancel)
           at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
           at Microsoft.AspNetCore.Mvc.ChallengeResult.ExecuteResultAsync(ActionContext context)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAlwaysRunResultFilters&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeFilterPipelineAsync&gt;g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
           at Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
           at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
  fail: Microsoft.AspNetCore.Server.IIS.Core.IISHttpServer[2]
        Connection ID &quot;17221764976675389469&quot;, Request ID &quot;8000001e-0000-ef00-b63f-84710c7967bb&quot;: An unhandled exception was thrown by the application.
        System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'System.String'.
         ---&gt; System.IO.IOException: IDX20804: Unable to retrieve document from: 'System.String'.
         ---&gt; System.Net.Http.HttpRequestException: No such host is known. (idsapp:44396)
         ---&gt; System.Net.Sockets.SocketException (11001): No such host is known.
           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.&lt;ConnectAsync&gt;g__WaitForConnectWithCancellation|283_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.DefaultConnectAsync(SocketsHttpConnectionContext context, CancellationToken cancellationToken)
           at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, CancellationToken cancellationToken)
           --- End of inner exception stack trace ---
           at System.Net.Http.ConnectHelper.ConnectAsync(Func`3 callback, DnsEndPoint endPoint, HttpRequestMessage requestMessage, 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.GetHttpConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
           at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.DiagnosticsHandler.SendAsyncCore(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
           at System.Net.Http.HttpClient.SendAsyncCore(HttpRequestMessage request, HttpCompletionOption completionOption, Boolean async, Boolean emitTelemetryStartStop, CancellationToken cancellationToken)
           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.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsyncInternal(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleChallengeAsync(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.AuthenticationHandler`1.ChallengeAsync(AuthenticationProperties properties)
           at Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, String scheme, AuthenticationProperties properties)
           at Microsoft.AspNetCore.Mvc.ChallengeResult.ExecuteResultAsync(ActionContext context)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAlwaysRunResultFilters&gt;g__Awaited|26_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeFilterPipelineAsync&gt;g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
           at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.&lt;InvokeAsync&gt;g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
           at Microsoft.AspNetCore.Routing.EndpointMiddleware.&lt;Invoke&gt;g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
           at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
           at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.&lt;Invoke&gt;g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
           at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.HandleException(HttpContext context, ExceptionDispatchInfo edi)
           at Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware.&lt;Invoke&gt;g__Awaited|6_0(ExceptionHandlerMiddleware middleware, HttpContext context, Task task)
           at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContextOfT`1.ProcessRequestAsync()
  info: Microsoft.Hosting.Lifetime[0]
        Application is shutting down...
  
  </code></pre>
  <p><strong><strong>Log from IDS4 App below:</strong></strong></p>
  <pre><code>[05:10:17 Information] 
  Starting host...
  
  [05:10:18 Information] IdentityServer4.Startup
  Starting IdentityServer4 version 4.1.1+cebd52f5bc61bdefc262fd20739d4d087c6f961f
  
  [05:10:18 Information] IdentityServer4.Startup
  Using the default authentication scheme Identity.Application for IdentityServer
  
  [05:10:18 Debug] IdentityServer4.Startup
  Using Identity.Application as default ASP.NET Core scheme for authentication
  
  [05:10:18 Debug] IdentityServer4.Startup
  Using Identity.External as default ASP.NET Core scheme for sign-in
  
  [05:10:18 Debug] IdentityServer4.Startup
  Using Identity.External as default ASP.NET Core scheme for sign-out
  
  [05:10:18 Debug] IdentityServer4.Startup
  Using Identity.Application as default ASP.NET Core scheme for challenge
  
  [05:10:18 Debug] IdentityServer4.Startup
  Using Identity.Application as default ASP.NET Core scheme for forbid
  
  [05:10:20 Debug] IdentityServer4.Startup
  Login Url: /Account/Login
  
  [05:10:20 Debug] IdentityServer4.Startup
  Login Return Url Parameter: ReturnUrl
  
  [05:10:20 Debug] IdentityServer4.Startup
  Logout Url: /Account/Login
  
  [05:10:20 Debug] IdentityServer4.Startup
  ConsentUrl Url: /consent
  
  [05:10:20 Debug] IdentityServer4.Startup
  Consent Return Url Parameter: returnUrl
  
  [05:10:20 Debug] IdentityServer4.Startup
  Error Url: /home/error
  
  [05:10:20 Debug] IdentityServer4.Startup
  Error Id Parameter: errorId
  
  [05:10:20 Debug] IdentityServer4.Hosting.EndpointRouter
  Request path /.well-known/openid-configuration matched to endpoint type Discovery
  
  [05:10:20 Debug] IdentityServer4.Hosting.EndpointRouter
  Request path /connect/token matched to endpoint type Token
  
  [05:10:20 Debug] IdentityServer4.Hosting.EndpointRouter
  Endpoint enabled: Discovery, successfully created handler: IdentityServer4.Endpoints.DiscoveryEndpoint
  
  [05:10:20 Information] IdentityServer4.Hosting.IdentityServerMiddleware
  Invoking IdentityServer endpoint: IdentityServer4.Endpoints.DiscoveryEndpoint for /.well-known/openid-configuration
  
  [05:10:20 Debug] IdentityServer4.Endpoints.DiscoveryEndpoint
  Start discovery request
  
  [05:10:20 Debug] IdentityServer4.Hosting.EndpointRouter
  Endpoint enabled: Token, successfully created handler: IdentityServer4.Endpoints.TokenEndpoint
  
  [05:10:20 Information] IdentityServer4.Hosting.IdentityServerMiddleware
  Invoking IdentityServer endpoint: IdentityServer4.Endpoints.TokenEndpoint for /connect/token
  
  [05:10:20 Warning] IdentityServer4.Endpoints.TokenEndpoint
  Invalid HTTP request for token endpoint
  
  [05:10:22 Warning] Microsoft.EntityFrameworkCore.Query
  Compiling a query which loads related collections for more than one collection navigation either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured. By default Entity Framework will use 'QuerySplittingBehavior.SingleQuery' which can potentially result in slow query performance. See https://go.microsoft.com/fwlink/?linkid=2134277 for more information. To identify the query that's triggering this warning call 'ConfigureWarnings(w =&gt; w.Throw(RelationalEventId.MultipleCollectionIncludeWarning))'
  
  [05:10:24 Warning] Microsoft.EntityFrameworkCore.Query
  Compiling a query which loads related collections for more than one collection navigation either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured. By default Entity Framework will use 'QuerySplittingBehavior.SingleQuery' which can potentially result in slow query performance. See https://go.microsoft.com/fwlink/?linkid=2134277 for more information. To identify the query that's triggering this warning call 'ConfigureWarnings(w =&gt; w.Throw(RelationalEventId.MultipleCollectionIncludeWarning))'
  
  [05:10:24 Warning] Microsoft.EntityFrameworkCore.Query
  Compiling a query which loads related collections for more than one collection navigation either via 'Include' or through projection but no 'QuerySplittingBehavior' has been configured. By default Entity Framework will use 'QuerySplittingBehavior.SingleQuery' which can potentially result in slow query performance. See https://go.microsoft.com/fwlink/?linkid=2134277 for more information. T
  </code></pre>
  <p>Please find screenshots attached for more clarity.</p>
  <p><a href="https://i.stack.imgur.com/SNb7n.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SNb7n.jpg" alt="Discovery Endpoint" /></a></p>
  <p><a href="https://i.stack.imgur.com/mgQUt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mgQUt.jpg" alt="HTTP 500 Error in Client App" /></a></p>