ASP.NET Core 1.0 ConfigurationBuilder().AddJsonFile(“appsettings.json”); not finding file

public Startup(IHostingEnvironment env)
{
    var builder = new ConfigurationBuilder()
        .SetBasePath(env.ContentRootPath)
        .AddJsonFile("appsettings.json");

    Configuration = builder.Build();
}

This seems to do the trick. However unsure this is the proper way to do it. Kinda feels like a hack.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)