错误的请求-请求时间过长 [英] bad request - request too long

查看:84
本文介绍了错误的请求-请求时间过长的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用IdentityServer3.我的入门班在下面.

I use IdentityServer3. My startup class is bellow.

public class Startup
{
    public void Configuration(IAppBuilder app)
    {

        app.Map("/identity", idsrvApp =>
        {
            var corsPolicyService = new DefaultCorsPolicyService()
            {
                AllowAll = true
            };

            var idServerServiceFactory = new IdentityServerServiceFactory()
            .UseInMemoryClients(Clients.Get())
            .UseInMemoryScopes(Scopes.Get());
            //.UseInMemoryUsers(Users.Get());

            idServerServiceFactory.CorsPolicyService = new Registration<IdentityServer3.Core.Services.ICorsPolicyService>(corsPolicyService);

            idServerServiceFactory.ViewService = new Registration<IViewService, CustomViewService>();
            idServerServiceFactory.UserService = new Registration<IUserService>(resolver => new CustomUserService());

            var options = new IdentityServerOptions
            {
                EnableWelcomePage = false,
                Factory = idServerServiceFactory,
                SiteName = "Justice Identity Server",
                IssuerUri = IdentityConstants.ecabinetIssuerUri,
                PublicOrigin = IdentityConstants.ecabinetSTSOrigin,
                AuthenticationOptions = new IdentityServer3.Core.Configuration.AuthenticationOptions() {
                    CookieOptions = {
                      AllowRememberMe=false,
                      Prefix="IC"
                        },
                    EnablePostSignOutAutoRedirect = true,



                },

                SigningCertificate = LoadSertificate(),
                CspOptions = new CspOptions()
                {
                    Enabled = true,
                    ScriptSrc = "'unsafe-inline'",
                    ConnectSrc = "*",
                    FrameSrc = "*"
                },

            };


            idsrvApp.UseIdentityServer(options);

        });


    }
    X509Certificate2 LoadSertificate()
    {
        return new X509Certificate2(string.Format(@"{0}\certificates\cert.pfx", AppDomain.CurrentDomain.BaseDirectory), "123", X509KeyStorageFlags.MachineKeySet);
    }
}

有时,当我清除cookie时,我收到错误的请求-请求太长"的提示.我在控制台中看到了很多现时的cookie.有人可以帮助我吗?谢谢你

After sometimes I have got "bad request-request too long" ,when I clear cookie it works. I have seen in console a lot of nonce cookies. Anyone could help me? thanks you

推荐答案

这是一个已知问题.那里有更多信息: https://github.com/IdentityServer/IdentityServer3/issues/1124

This is a known issue. There is more info there: https://github.com/IdentityServer/IdentityServer3/issues/1124

这篇关于错误的请求-请求时间过长的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆