[英]ArgumentNullException: Value cannot be null. Parameter name: connectionString
I've cloned this code from github.我已经从 github 克隆了这段代码。 The code enables to authenticate users against Active Directory.
该代码可以根据 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?
您将如何修改程序以拥有一些测试数据库并能够跟踪它?
You need a value in your config for ConnectionStrings:DefaultConnection
.您需要在配置中为
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.看起来令人困惑的是,有问题的 GitHub 项目没有
appsettings.json
,实际上在appsettings.github.json
定义了这个配置键,它不是默认加载的配置文件。 If you rename that file to appsettings.json
, that may be enough to fix the issue.如果将该文件重命名为
appsettings.json
,则可能足以解决问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.