Open Closed

Startup configuration problem on deployed ASP.NET Core & Angular #6460

abdourahmani created

Hi ! Can some one give me some guidance to correct this issue ? The App runs fines in developpment and crashes when deployed.

I'm using ASP.NET CORE & Angular V.6.0.0

` Unhandled Exception: System.ArgumentNullException: Value cannot be null.

Parameter name: value

at System.Boolean.Parse(String value)

at Lbi.Immob.Web.Startup.AuthConfigurer.Configure(IServiceCollection services, IConfiguration configuration)

at Lbi.Immob.Web.Startup.Startup.ConfigureServices(IServiceCollection services) in D:\MyWorkingDir\Immob\aspnet-core\src\Lbi.Immob.Web.Host\Startup\Startup.cs:line 101

--- End of stack trace from previous location where exception was thrown ---

at Microsoft.AspNetCore.Hosting.ConventionBasedStartup.ConfigureServices(IServiceCollection services)

at Microsoft.AspNetCore.Hosting.Internal.WebHost.EnsureApplicationServices()

at Microsoft.AspNetCore.Hosting.Internal.WebHost.Initialize()

at Microsoft.AspNetCore.Hosting.WebHostBuilder.Build()

at Lbi.Immob.Web.Startup.Program.Main(String[] args) in D:\MyWorkingDir\Immob\aspnet-core\src\Lbi.Immob.Web.Host\Startup\Program.cs:line 10`

4 Answer(s)
  • 0
    ryancyq created

    Hi, please share your appSettings.json and appSettings.production.json

  • 0
    abdourahmani created

    Hi @ryancyq,

    Here they are :


        "ConnectionStrings": {
            "Default": "Server=localhost; Database=ImmobDb; Trusted_Connection=True;"
        "AbpZeroLicenseCode": "xxxxxxxxxxxx"


        "ConnectionStrings": {
            "Default": "Server=; Database=ImmobDb; User=xyza; Password=xxxxx;"
        "App": {
            "WebSiteRootAddress": "http://localhost:9901/",
            "ClientRootAddress": "http://localhost:4200/",
            "CorsOrigins": "http://localhost:9902"
  • 1
    aaron created

    You are missing:

    • "Authentication:JwtBearer:IsEnabled"
    • "IdentityServer:IsEnabled"

    Don't arbitrarily remove settings from appSettings.json.

  • 0
    abdourahmani created

    Thank you, It runs fine now.

    I didn't notice the removal of these items