<i id='omQjK'><tr id='omQjK'><dt id='omQjK'><q id='omQjK'><span id='omQjK'><b id='omQjK'><form id='omQjK'><ins id='omQjK'></ins><ul id='omQjK'></ul><sub id='omQjK'></sub></form><legend id='omQjK'></legend><bdo id='omQjK'><pre id='omQjK'><center id='omQjK'></center></pre></bdo></b><th id='omQjK'></th></span></q></dt></tr></i><div id='omQjK'><tfoot id='omQjK'></tfoot><dl id='omQjK'><fieldset id='omQjK'></fieldset></dl></div>

      <small id='omQjK'></small><noframes id='omQjK'>

        <tfoot id='omQjK'></tfoot>
        • <bdo id='omQjK'></bdo><ul id='omQjK'></ul>
        <legend id='omQjK'><style id='omQjK'><dir id='omQjK'><q id='omQjK'></q></dir></style></legend>

        MVC6 中的 ASP 标识 - 登录路径属性不起作用

        ASP Identity in MVC6 - Login Path property not working(MVC6 中的 ASP 标识 - 登录路径属性不起作用)
      1. <legend id='q6Lox'><style id='q6Lox'><dir id='q6Lox'><q id='q6Lox'></q></dir></style></legend>
        <tfoot id='q6Lox'></tfoot>

            • <bdo id='q6Lox'></bdo><ul id='q6Lox'></ul>
              <i id='q6Lox'><tr id='q6Lox'><dt id='q6Lox'><q id='q6Lox'><span id='q6Lox'><b id='q6Lox'><form id='q6Lox'><ins id='q6Lox'></ins><ul id='q6Lox'></ul><sub id='q6Lox'></sub></form><legend id='q6Lox'></legend><bdo id='q6Lox'><pre id='q6Lox'><center id='q6Lox'></center></pre></bdo></b><th id='q6Lox'></th></span></q></dt></tr></i><div id='q6Lox'><tfoot id='q6Lox'></tfoot><dl id='q6Lox'><fieldset id='q6Lox'></fieldset></dl></div>

                  <tbody id='q6Lox'></tbody>
              1. <small id='q6Lox'></small><noframes id='q6Lox'>

                • 本文介绍了MVC6 中的 ASP 标识 - 登录路径属性不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  从 beta 5 更新到 beta 8 后,我无法在 cookie 身份验证选项中设置自定义登录路径.

                  After updating from beta 5 to beta 8 I can't set my custom login path in cookie authentication options.

                  services.AddCookieAuthentication(config =>
                  {
                      config.LoginPath = "/Auth/Login";
                      //or
                      //config.LoginPath = new Microsoft.AspNet.Http.PathString("Auth/Login");
                  });
                  

                  这个值被完全忽略.仍然会被重定向到默认的/Account/Login".还有其他选项可以设置此路径吗?

                  This value is completely ignored. Still gets redirected to the default '/Account/Login'. Is there any other options to set this path?

                  推荐答案

                  看来现在你应该做的有点不同(对我有用):

                  It seems that now you should do this a bit differently (worked for me):

                  services.Configure<IdentityOptions>(options=>
                  {
                      options.Cookies.ApplicationCookie.LoginPath = new Microsoft.AspNet.Http.PathString("/Auth/Login");
                  });
                  

                  来自这里.

                  这篇关于MVC6 中的 ASP 标识 - 登录路径属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Adding DbContextOptions in Startup.cs not registering data store(在 Startup.cs 中添加 DbContextOptions 未注册数据存储)
                  Migrate html helpers to ASP.NET Core(将 html 帮助程序迁移到 ASP.NET Core)
                  Conditional validation in MVC.NET Core (RequiredIf)(MVC.NET Core 中的条件验证(RequiredIf))
                  Is it possible to serve static files from outside the wwwroot folder?(是否可以从 wwwroot 文件夹外部提供静态文件?)
                  Working with multiple resultset in .net core(在 .net 核心中使用多个结果集)
                  Where all types for http headers gone in ASP.NET 5?(ASP.NET 5 中所有类型的 http 标头都去了哪里?)
                    <bdo id='i6G6H'></bdo><ul id='i6G6H'></ul>

                            <small id='i6G6H'></small><noframes id='i6G6H'>

                            <legend id='i6G6H'><style id='i6G6H'><dir id='i6G6H'><q id='i6G6H'></q></dir></style></legend>

                              <tbody id='i6G6H'></tbody>
                            <i id='i6G6H'><tr id='i6G6H'><dt id='i6G6H'><q id='i6G6H'><span id='i6G6H'><b id='i6G6H'><form id='i6G6H'><ins id='i6G6H'></ins><ul id='i6G6H'></ul><sub id='i6G6H'></sub></form><legend id='i6G6H'></legend><bdo id='i6G6H'><pre id='i6G6H'><center id='i6G6H'></center></pre></bdo></b><th id='i6G6H'></th></span></q></dt></tr></i><div id='i6G6H'><tfoot id='i6G6H'></tfoot><dl id='i6G6H'><fieldset id='i6G6H'></fieldset></dl></div>
                            <tfoot id='i6G6H'></tfoot>