title: 503 Service Unavailable for Asp dotnet core 2.0 web app on linux server
body: <p>I'm trying to deploying my asp.net core 2.0 web application + angular 6 project on linux ubuntu 18.04 os.I'm using apache2 server.</p>
  
  <p>this is apache config file</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  ProxyPreserveHost On
  ProxyPass / http://127.0.0.1:5000/
  ProxyPassReverse / http://127.0.0.1:5000/
  ErrorLog /var/log/apache2/datingapp-error.log
  CustomLog /var/log/apache2/datingapp-access.log common
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>here is the kestrel web server service file code</p>
  
  <pre><code>[Unit]
  Description=Example .NET Web API App running on CentOS 7
  [Service]
  WorkingDirectory=/var/socialapp
  ExecStart=/usr/bin/dotnet /var/socialapp/SocialApp.API.dll
  Restart=always
  RestartSec=10
  KillSignal=SIGINT
  SyslogIdentifier=dotnet-demo
  User=www-data
  Environment=ASPNETCORE_ENVIRONMENT=Production
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>I created another application in this server and try to run it.Then it is working properly.Only not working what I'm trying to deploying this project from my local machine.</p>
  
  <p>After that when try to get the kestrel service status,then this error occurring</p>
  
  <pre><code> Process: 3514 ExecStart=/usr/bin/dotnet /var/socialapp/SocialApp.API.dll (code=killed, signal=ABRT)
   Main PID: 3514 (code=killed, signal=ABRT)
  </code></pre>
  
  <p>In the server I installed dotnet core sdk 2.2.But in my local machine I installed 2.1 version.</p>
  
  <p>I'm using visual Studio code ide to develop this project.</p>
  
  <p>I moved my web project to wwwroot directory.</p>
  
  <p>here is program.cs file code</p>
  
  <pre><code>public class Program
      {
          public static void Main(string[] args)
          {
              CreateWebHostBuilder(args).Build().Run();
          }
  
          public static IWebHostBuilder CreateWebHostBuilder(string[] args) =&gt;
              WebHost.CreateDefaultBuilder(args)
              .UseContentRoot(Directory.GetCurrentDirectory())
                  .UseStartup&lt;Startup&gt;();
      }
  </code></pre>
  
  <p>edited:
  when executing /usr/bin/dotnet /var/socialapp/SocialApp.API.dll
  I got these errors</p>
  
  <pre><code>    Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[0]
        User profile is available. Using '/root/.aspnet/DataProtection-Keys' as key repository; keys will not be encrypted at rest.
  Application startup exception: System.Exception: Could not resolve a service of type 'SocialApp.API.Data.Seed' for the parameter 'seeder' of method 'Configure' on type 'SocialApp.API.Startup'. ---&gt; System.ArgumentNullException: Value cannot be null.
  Parameter name: connectionString
     at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
     at Microsoft.EntityFrameworkCore.MySqlDbContextOptionsExtensions.UseMySql(DbContextOptionsBuilder optionsBuilder, String connectionString, Action`1 mySqlOptionsAction)
     at SocialApp.API.Startup.&lt;ConfigureServices&gt;b__4_0(DbContextOptionsBuilder s) in D:\MProj\Asp.net-core\SocialApp\SocialApp.API\Startup.cs:line 44
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c__DisplayClass1_0`2.&lt;AddDbContext&gt;b__0(IServiceProvider p, DbContextOptionsBuilder b)
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c__DisplayClass10_0`1.&lt;AddCoreServices&gt;b__0(IServiceProvider p)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.&lt;&gt;c__DisplayClass1_0.&lt;RealizeService&gt;b__0(ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
     at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
     --- End of inner exception stack trace ---
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.&lt;&gt;c__DisplayClass4_0.&lt;Build&gt;b__0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
     at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.HostFilteringStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder app)
     at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
  crit: Microsoft.AspNetCore.Hosting.Internal.WebHost[6]
        Application startup exception
  System.Exception: Could not resolve a service of type 'SocialApp.API.Data.Seed' for the parameter 'seeder' of method 'Configure' on type 'SocialApp.API.Startup'. ---&gt; System.ArgumentNullException: Value cannot be null.
  Parameter name: connectionString
     at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
     at Microsoft.EntityFrameworkCore.MySqlDbContextOptionsExtensions.UseMySql(DbContextOptionsBuilder optionsBuilder, String connectionString, Action`1 mySqlOptionsAction)
     at SocialApp.API.Startup.&lt;ConfigureServices&gt;b__4_0(DbContextOptionsBuilder s) in D:\MProj\Asp.net-core\SocialApp\SocialApp.API\Startup.cs:line 44
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c__DisplayClass1_0`2.&lt;AddDbContext&gt;b__0(IServiceProvider p, DbContextOptionsBuilder b)
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c__DisplayClass10_0`1.&lt;AddCoreServices&gt;b__0(IServiceProvider p)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.&lt;&gt;c__DisplayClass1_0.&lt;RealizeService&gt;b__0(ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
     at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
     --- End of inner exception stack trace ---
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.&lt;&gt;c__DisplayClass4_0.&lt;Build&gt;b__0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
     at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.HostFilteringStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder app)
     at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
  
  Unhandled Exception: System.Exception: Could not resolve a service of type 'SocialApp.API.Data.Seed' for the parameter 'seeder' of method 'Configure' on type 'SocialApp.API.Startup'. ---&gt; System.ArgumentNullException: Value cannot be null.
  Parameter name: connectionString
     at Microsoft.EntityFrameworkCore.Utilities.Check.NotEmpty(String value, String parameterName)
     at Microsoft.EntityFrameworkCore.MySqlDbContextOptionsExtensions.UseMySql(DbContextOptionsBuilder optionsBuilder, String connectionString, Action`1 mySqlOptionsAction)
     at SocialApp.API.Startup.&lt;ConfigureServices&gt;b__4_0(DbContextOptionsBuilder s) in D:\MProj\Asp.net-core\SocialApp\SocialApp.API\Startup.cs:line 44
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c__DisplayClass1_0`2.&lt;AddDbContext&gt;b__0(IServiceProvider p, DbContextOptionsBuilder b)
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.DbContextOptionsFactory[TContext](IServiceProvider applicationServiceProvider, Action`2 optionsAction)
     at Microsoft.Extensions.DependencyInjection.EntityFrameworkServiceCollectionExtensions.&lt;&gt;c__DisplayClass10_0`1.&lt;AddCoreServices&gt;b__0(IServiceProvider p)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitFactory(FactoryCallSite factoryCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitScoped(ScopedCallSite scopedCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitConstructor(ConstructorCallSite constructorCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteRuntimeResolver.VisitTransient(TransientCallSite transientCallSite, ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteVisitor`2.VisitCallSite(IServiceCallSite callSite, TArgument argument)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.DynamicServiceProviderEngine.&lt;&gt;c__DisplayClass1_0.&lt;RealizeService&gt;b__0(ServiceProviderEngineScope scope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
     at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngineScope.GetService(Type serviceType)
     at Microsoft.Extensions.DependencyInjection.ServiceProviderServiceExtensions.GetRequiredService(IServiceProvider provider, Type serviceType)
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
     --- End of inner exception stack trace ---
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.Invoke(Object instance, IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.Internal.ConfigureBuilder.&lt;&gt;c__DisplayClass4_0.&lt;Build&gt;b__0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.Configure(IApplicationBuilder app)
     at Microsoft.AspNetCore.Mvc.Internal.MiddlewareFilterBuilderStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;g__MiddlewareFilterBuilder|0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.HostFilteringStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder app)
     at Microsoft.AspNetCore.Hosting.Internal.AutoRequestServicesStartupFilter.&lt;&gt;c__DisplayClass0_0.&lt;Configure&gt;b__0(IApplicationBuilder builder)
     at Microsoft.AspNetCore.Hosting.Internal.WebHost.BuildApplication()
     at Microsoft.AspNetCore.Hosting.Internal.WebHost.StartAsync(CancellationToken cancellationToken)
     at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token, String shutdownMessage)
     at Microsoft.AspNetCore.Hosting.WebHostExtensions.RunAsync(IWebHost host, CancellationToken token)
     at Microsoft.AspNetCore.Hosting.WebHostExtensions.Run(IWebHost host)
     at SocialApp.API.Program.Main(String[] args) in D:\MProj\Asp.net-core\SocialApp\SocialApp.API\Program.cs:line 17
  Aborted (core dumped)
  </code></pre>
  
  <p>here is appsettings.json file code</p>
  
  <pre><code>{
    "AppSettings": {
      "Token": "super secret key"
    },
    "ConnectionStrings": {
      "DefaultConnection": "Server=localhost; Database=socialApp; Uid=root; Pwd=mysql12$#;",
      "DefaultConnection2": "Data Source=DatingApp.db"
    },
    "Logging": {
      "LogLevel": {
        "Default": "Warning"
      }
    },
    "AllowedHosts": "*"
  }
  </code></pre>
  
  <p>here is the startup file full code</p>
  
  <pre><code>public class Startup
      {
          public Startup(IConfiguration configuration)
          {
              Configuration = configuration;
          }
  
  
          public IConfiguration Configuration { get; }
  
          // This method gets called by the runtime. Use this method to add services to the container.
          public void ConfigureServices(IServiceCollection services)
          {
              services.AddDbContext&lt;DataContext&gt;(s =&gt; s.UseMySql(Configuration.GetConnectionString("DefaultConnection"))
              .ConfigureWarnings(warnings =&gt; warnings.Ignore(CoreEventId.IncludeIgnoredWarning)));
  
              IdentityBuilder builder = services.AddIdentityCore&lt;User&gt;(opt =&gt;
              {
                  opt.Password.RequireDigit = false;
                  opt.Password.RequiredLength = 4;
                  opt.Password.RequireNonAlphanumeric = false;
                  opt.Password.RequireUppercase = false;
  
              });
  
              builder = new IdentityBuilder(builder.UserType, typeof(Role), builder.Services);
              builder.AddEntityFrameworkStores&lt;DataContext&gt;();
              builder.AddRoleValidator&lt;RoleValidator&lt;Role&gt;&gt;();
              builder.AddRoleManager&lt;RoleManager&lt;Role&gt;&gt;();
              builder.AddSignInManager&lt;SignInManager&lt;User&gt;&gt;();
  
  
  
              // services.AddAuthorization(options =&gt; {
              //     options.AddPolicy("RequireAdminRole", policy =&gt; policy.RequireRole("Admin"));
              //     options.AddPolicy("SuperAdminPhotoRole", policy =&gt; policy.RequireRole("SuperAdmin"));
              // });
  
              services.AddMvc(options =&gt;
              {
                  var policy = new AuthorizationPolicyBuilder()
                      .RequireAuthenticatedUser()
                      .Build();
                  options.Filters.Add(new AuthorizeFilter(policy));
              })
              .SetCompatibilityVersion(CompatibilityVersion.Version_2_1)
              .AddJsonOptions(opt =&gt;
              {
                  opt.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;
              });
              services.AddCors();
              services.AddAutoMapper();
              services.AddTransient&lt;Seed&gt;();
              services.AddScoped&lt;IAuthRepository, AuthRepository&gt;();
              services.AddScoped&lt;IDatingRepository, DatingRepository&gt;();
              services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
              .AddJwtBearer(options =&gt;
              {
                  options.TokenValidationParameters = new TokenValidationParameters
                  {
                      ValidateIssuerSigningKey = true,
                      IssuerSigningKey = new SymmetricSecurityKey(Encoding.ASCII
                        .GetBytes(Configuration.GetSection("AppSettings:Token").Value)),
                      ValidateIssuer = false,
                      ValidateAudience = false
                  };
              });
              services.AddScoped&lt;LogUserActivity&gt;();
  
          }
  
          // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
          public void Configure(IApplicationBuilder app, IHostingEnvironment env, Seed seeder)
          {
              if (env.IsDevelopment())
              {
                  app.UseDeveloperExceptionPage();
              }
              else
              {
  
                  app.UseExceptionHandler(builder =&gt;
                  {
                      builder.Run(async context =&gt;
                      {
                          context.Response.StatusCode = (int)HttpStatusCode.InternalServerError;
  
                          var error = context.Features.Get&lt;IExceptionHandlerFeature&gt;();
                          if (error != null)
                          {
                              context.Response.AddApplicationError(error.Error.Message);
                              await context.Response.WriteAsync(error.Error.Message);
                          }
                      });
                  });
  
                  // app.UseHsts();
              }
  
              // app.UseHttpsRedirection();
              seeder.SeedUsers();
              app.UseCors(x =&gt; x.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
              app.UseAuthentication();
              app.UseDefaultFiles();
              app.UseStaticFiles();
              app.UseMvc(routes =&gt; {
                  routes.MapSpaFallbackRoute(
                      name: "spa-fallback",
                      defaults: new { controller = "FallBack", action = "Index"}
                  );
              });
          }
      }
  </code></pre>
  
  <p>please help me to solve this problem.
  thanks</p>