Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 在ASP.NET核心声明中存储多址令牌会导致;请求错误-请求太长”;_C#_Google Chrome_Asp.net Core_Cookies_Oauth 2.0 - Fatal编程技术网

C# 在ASP.NET核心声明中存储多址令牌会导致;请求错误-请求太长”;

C# 在ASP.NET核心声明中存储多址令牌会导致;请求错误-请求太长”;,c#,google-chrome,asp.net-core,cookies,oauth-2.0,C#,Google Chrome,Asp.net Core,Cookies,Oauth 2.0,我有一个带有个人用户身份验证的web应用程序,一旦用户登录,我就会将他们的UserId和RoleId存储为声明 var claims = new List<Claim> { new Claim ("Id", User.Id), new Claim ("RoleId", User.RoleId) }; 它创造了一个很好的小饼干,一切都很好 但现在我需要链接一些外部资源提供者。一旦OAuth进程完成,我将在声明中存储access

我有一个带有个人用户身份验证的web应用程序,一旦用户登录,我就会将他们的
UserId
RoleId
存储为声明

var claims = new List<Claim>
{
    new Claim ("Id", User.Id),
    new Claim ("RoleId", User.RoleId)
};
它创造了一个很好的小饼干,一切都很好

但现在我需要链接一些外部资源提供者。一旦OAuth进程完成,我将在声明中存储
access\u令牌
refresh\u令牌

一旦用户使用2个或3个提供商的登录,Cookie计数就会增加。

这最终导致了

Bad Request - Request Too Long
HTTP Error 400. The size of the request headers is too long.

您可以尝试清除所有Cookie,或查看以下内容:
Bad Request - Request Too Long
HTTP Error 400. The size of the request headers is too long.