【发布时间】:2022-01-19 06:07:51
【问题描述】:
我是 .NET (Core) 5 的新手,我正在尝试像在 web.config 文件中的先前版本一样添加 Windows 身份验证:
<authorization>
<deny users="?" />
<allow roles="Group1" />
<allow roles="Group2" />
<deny users="*" />
</authorization>
在我的 .NET Core 应用程序的 launchSettings.json 中,我做了以下更改:
"iisSettings": {
"windowsAuthentication": true,
"anonymousAuthentication": false,
"iisExpress": {
"applicationUrl": "http://localhost:47743",
"sslPort": 0
}
},
但是不知道怎么定义:
<allow roles="Group1"/>
在launchSettings.json.
【问题讨论】:
标签: asp.net-core authentication .net-core windows-authentication