The configuration file 'appsettings.json' was not found and is not optional... 500 error
Hey,
Has anyone experienced this before? I am deploying an ASP.Net Core MVC 6 web app. Right now I am getting this error. It relates to my startup method. Ive check online and I have everything as it needs to be. I have added it to my publishOptions in my program.json, and I have a set base in my method as well.
public Startup(IHostingEnvironment environment)
{
var builder = new ConfigurationBuilder()
.SetBasePath(environment.ContentRootPath)
.AddJsonFile("TestJson.json");
Configuration = builder.Build();
}
If you have any suggestions please let me know!! Ive been struggling with this for a few weeks now.
Discussions are closed to public comments.
If you need help with AppHarbor please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by rune on 08 Sep, 2017 03:02 AM
Hi,
I've followed up in this related discussion and will close this one for now!
Best,
Rune
rune closed this discussion on 08 Sep, 2017 03:02 AM.