【发布时间】:2016-08-10 16:00:07
【问题描述】:
我已经从here 下载了 IdentityServer 的代码。在 IIS Express 中运行 IdentityServer3\Host.Web 解决方案时,我可以使用 TokenClient.RequestResourceOwnerPasswordAsync 方法从控制台客户端进行身份验证。
但是,当我切换 IdentityServer3\Host.Web 以直接在 IIS 下运行时,我收到以下错误:
HTTP Error 401.1 - Unauthorized
You do not have permission to view this directory or page using the credentials that you supplied.
Most likely causes:
- The username supplied to IIS is invalid.
- The password supplied to IIS was not typed correctly.
- Incorrect credentials were cached by the browser.
- IIS could not verify the identity of the username and password provided.
- The resource is configured for Anonymous authentication, but the configured anonymous account either has an invalid password or was disabled.
- The server is configured to deny login privileges to the authenticating user or the group in which the user is a member.
- Invalid Kerberos configuration may be the cause if all of the following are true:
- Integrated authentication was used.
- the application pool identity is a custom account.
the server is a member of a domain.
为了让 IdentityServer3 在 IIS 下工作,我必须进行哪些不同的配置?
【问题讨论】:
-
是否允许匿名身份验证。
-
@BrockAllen - 启用了匿名身份验证,但事实证明也启用了基本身份验证。通过禁用基本身份验证,IIS 会忽略身份验证标头,并且身份服务器可以正常工作。
标签: identityserver3