Archived Support Site

This support site is archived. You can view the old support discussions but you cannot post new discussions.

The configuration file 'appsettings.json' was not found and is not optional... 500 error

dubnogeoff's Avatar

dubnogeoff

04 Sep, 2017 11:32 PM

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.

  1. Support Staff 1 Posted by rune on 08 Sep, 2017 03:02 AM

    rune's Avatar

    Hi,

    I've followed up in this related discussion and will close this one for now!

    Best,
    Rune

  2. rune closed this discussion on 08 Sep, 2017 03:02 AM.

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