更新时间:2022-03-11 19:44:47
我认为您忘记了使用Server.MapPath
函数.
您可以使用以下代码编辑Constructor
:
I think you forget to use Server.MapPath
function.
You can edit your Constructor
with following code :
public Startup()
{
var builder = new ConfigurationBuilder()
.AddJsonFile(HttpContext.Current.Server.MapPath("~/config.json"));
Configuration = builder.Build();
}
希望它对您有帮助:)