简体   繁体   English

从IndentityServer 3请求令牌时,为什么会出现HttpError

[英]Why would I get a HttpError when requesting a token from IndentityServer 3

I have a standard IndentityServer 3 application that I use to generate tokens for my applications. 我有一个标准的IndentityServer 3应用程序,可用于为应用程序生成令牌。 I deployed multiple instances of this application to different servers and I can successfully request tokens from all of them. 我将这个应用程序的多个实例部署到了不同的服务器上,并且可以从所有服务器成功请求令牌。 Recently I deployed another instance to a Windows Server 2012 and started getting a HttpError when requesting tokens 最近,我将另一个实例部署到Windows Server 2012,并在请求令牌时开始获取HttpError

在此处输入图片说明

I use the following code to request a token 我使用以下代码请求令牌

var tokenClient = new TokenClient(identityServerUrl,clientId,clientSecret);

var result = tokenClient.RequestClientCredentialsAsync("Test").Result;

Any ideas on what may be causing IdentityServer 3 to get a HttpError? 关于可能导致IdentityServer 3收到HttpError的任何想法?

This problem was occurring because of an IIS configuration. 发生此问题是由于IIS配置。 Double click on your server in IIS Manager and double click on Authentication 双击IIS管理器中的服务器,然后双击身份验证

在此处输入图片说明 .

Make sure that obly Anonymous Authentication is enabled. 确保启用了匿名认证。

在此处输入图片说明

Very Important: Apply the same settings for your IdentityServer site. 非常重要:为您的IdentityServer站点应用相同的设置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 电子交易:请求访问令牌,我得到签名无效 - E-trade: requesting access token, I get signature invalid 当我从ID请求图片+名称时,SQL仅读取1个UserID。 想知道为什么 - SQL is only reading 1 UserID When I'm Requesting A Picture + Name from the ID. Wondering Why 申请证书时,如何获得pfx Blob? - When requesting a certificate, how do I get a pfx blob? 我无法从HttpError中读取responseStream - I can't read a responseStream from a HttpError 从 API 请求访问令牌时请求无效:C#、Azure 函数、OAuth - Invalid request when requesting Access token from API: C#, Azure Function, OAuth 为什么使用此代码会收到“无效的演员表”? - Why would I get an “Invalid Cast” with this code? 我如何在PHP中生成相同的标记? (来自.NET) - How would I generate this same token in PHP? (From .NET) 为什么在使用WriteValue更新布尔绑定时会出现格式异常? - Why would I get a format exception when updating a boolean binding with WriteValue? 当我发送超过过期日期的令牌时,为什么会收到 401 错误? - Why do I get a 401 error when I send a token beyond its expiration date? Owin auth - 如何获取请求身份验证令牌的客户端的IP地址 - Owin auth - how to get IP address of client requesting the auth token
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM