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

    1. <small id='TofRY'></small><noframes id='TofRY'>

        <bdo id='TofRY'></bdo><ul id='TofRY'></ul>
      <tfoot id='TofRY'></tfoot>

      1. <i id='TofRY'><tr id='TofRY'><dt id='TofRY'><q id='TofRY'><span id='TofRY'><b id='TofRY'><form id='TofRY'><ins id='TofRY'></ins><ul id='TofRY'></ul><sub id='TofRY'></sub></form><legend id='TofRY'></legend><bdo id='TofRY'><pre id='TofRY'><center id='TofRY'></center></pre></bdo></b><th id='TofRY'></th></span></q></dt></tr></i><div id='TofRY'><tfoot id='TofRY'></tfoot><dl id='TofRY'><fieldset id='TofRY'></fieldset></dl></div>
      2. ASP.NET Core 2.0 中 Web API 的本地用户帐户存储

        时间:2023-07-11

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

              1. <small id='d61qE'></small><noframes id='d61qE'>

                • <bdo id='d61qE'></bdo><ul id='d61qE'></ul>
                  本文介绍了ASP.NET Core 2.0 中 Web API 的本地用户帐户存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我正在使用 ASP.Net Core 2.0,我想构建一个具有个人用户帐户授权类型的 Web API 项目,但唯一的选择是连接到云中的现有用户存储.

                  I'm using ASP.Net Core 2.0, I want to build a Web API project with Individual User Accounts Authorization type, but the only option is Connect to an existing user store in the cloud.

                  如何使用将用户帐户存储在应用程序中为具有个人用户帐户的 Web API 添加模板?

                  How can I add a template for Web API with Individual User Accounts with Store user accounts in-app?

                  此选项适用于 Web 应用程序,但不适用于 Web API.

                  This option is available for Web Application but not for Web API.

                  推荐答案

                  尝试在控制台中使用命令启动你的项目

                  Try start your project in the console with the command

                  dotnet new webapi -au Individual
                  

                  之后您可以在 VS 中打开您的项目.(解决对话框).然后您可以使用例如授权属性.但该项目仍配置为使用 Azure 承载身份验证.你必须决定从哪里获得身份.您可以使用 identityserver4 或构建自己的ASP.NET Core Identity 的自定义存储提供程序"(MS-Docs)

                  You can open your project in VS after that. (to work around the dialog). Then you can use for example the authorize-attribute. But the project is still configured to use Azure Bearer Authentication. You have to decide where to get identity from. You can take identityserver4 or build your own "Custom storage providers for ASP.NET Core Identity" (MS-Docs)

                  与 MVC WebApp 的区别:这里有一个帐户控制器,其中包含处理注册和获取用户名和密码等的视图.

                  The difference to MVC WebApp: here you have an account controller with views to handle registrations and get a username and password and so forth.

                  这篇关于ASP.NET Core 2.0 中 Web API 的本地用户帐户存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:System.Web.HttpUtility.UrlEncode/UrlDecode ASP.NET 5 的替换 下一篇:从动作返回文件时,流会被释放吗?

                  相关文章

                    <bdo id='780QK'></bdo><ul id='780QK'></ul>
                  1. <tfoot id='780QK'></tfoot>

                    1. <legend id='780QK'><style id='780QK'><dir id='780QK'><q id='780QK'></q></dir></style></legend>
                      <i id='780QK'><tr id='780QK'><dt id='780QK'><q id='780QK'><span id='780QK'><b id='780QK'><form id='780QK'><ins id='780QK'></ins><ul id='780QK'></ul><sub id='780QK'></sub></form><legend id='780QK'></legend><bdo id='780QK'><pre id='780QK'><center id='780QK'></center></pre></bdo></b><th id='780QK'></th></span></q></dt></tr></i><div id='780QK'><tfoot id='780QK'></tfoot><dl id='780QK'><fieldset id='780QK'></fieldset></dl></div>
                    2. <small id='780QK'></small><noframes id='780QK'>