ArgumentNullException: Value cannot be null. Parameter name: connectionString

I've cloned this code from github. The code enables to authenticate users against Active Directory. More here

When I run it, it throws the error in the title. How would you modify the program to have some test DB and be able to trace it?

1 answer

  • answered 2019-06-24 19:04 Chris Pratt

    You need a value in your config for ConnectionStrings:DefaultConnection. It would seem that the confusion is that the GitHub project in question has no appsettings.json, and actually defines this config key in appsettings.github.json, which is not a config file that will be loaded in by default. If you rename that file to appsettings.json, that may be enough to fix the issue.