<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 标识 - 登录路径属性不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

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

                  相关文档推荐

                  Multicast delegate weird behavior in C#?(C# 中的多播委托奇怪行为?)
                  Parameter count mismatch with Invoke?(参数计数与调用不匹配?)
                  How to store delegates in a List(如何将代表存储在列表中)
                  How delegates work (in the background)?(代表如何工作(在后台)?)
                  C# Asynchronous call without EndInvoke?(没有 EndInvoke 的 C# 异步调用?)
                  Delegate.CreateDelegate() and generics: Error binding to target method(Delegate.CreateDelegate() 和泛型:错误绑定到目标方法)
                    <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>