如何删除默认的 ASP.NET Core Identity 端点?

2024-01-07

假设我想编写自己的登录、注销端点及其视图

但由于某种原因,我正在努力删除现有端点

每当我删除可能与这些端点相关的内容时,它们就会重新创建自己并返回默认视图。

基本上我想删除尽可能多的从 ASP.NET Core Identity 生成的默认端点/视图

关于如何实现这一目标有什么想法吗?

        "Templates/Identity/Pages/Account/Account.AccessDenied.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.AccessDenied.cshtml",
        "Templates/Identity/Pages/Account/Account.ConfirmEmail.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.ConfirmEmail.cshtml",
        "Templates/Identity/Pages/Account/Account.ExternalLogin.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.ExternalLogin.cshtml",
        "Templates/Identity/Pages/Account/Account.ForgotPassword.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.ForgotPassword.cshtml",
        "Templates/Identity/Pages/Account/Account.ForgotPasswordConfirmation.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.ForgotPasswordConfirmation.cshtml",
        "Templates/Identity/Pages/Account/Account.Lockout.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.Lockout.cshtml",
        "Templates/Identity/Pages/Account/Account.Login.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.Login.cshtml",
        "Templates/Identity/Pages/Account/Account.LoginWith2fa.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.LoginWith2fa.cshtml",
        "Templates/Identity/Pages/Account/Account.LoginWithRecoveryCode.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.LoginWithRecoveryCode.cshtml",
        "Templates/Identity/Pages/Account/Account.Logout.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.Logout.cshtml",
        "Templates/Identity/Pages/Account/Account.Register.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.Register.cshtml",
        "Templates/Identity/Pages/Account/Account.ResetPassword.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.ResetPassword.cshtml",
        "Templates/Identity/Pages/Account/Account.ResetPasswordConfirmation.cs.cshtml",
        "Templates/Identity/Pages/Account/Account.ResetPasswordConfirmation.cshtml",
        "Templates/Identity/Pages/Account/Account._ViewImports.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ChangePassword.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ChangePassword.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.DeletePersonalData.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.DeletePersonalData.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.Disable2fa.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.Disable2fa.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.DownloadPersonalData.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.DownloadPersonalData.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.EnableAuthenticator.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.EnableAuthenticator.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ExternalLogins.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ExternalLogins.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.GenerateRecoveryCodes.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.GenerateRecoveryCodes.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.Index.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.Index.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ManageNavPages.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.PersonalData.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.PersonalData.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ResetAuthenticator.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ResetAuthenticator.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.SetPassword.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.SetPassword.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ShowRecoveryCodes.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.ShowRecoveryCodes.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.TwoFactorAuthentication.cs.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage.TwoFactorAuthentication.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage._Layout.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage._ManageNav.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage._StatusMessage.cshtml",
        "Templates/Identity/Pages/Account/Manage/Account.Manage._ViewImports.cshtml",
        (...)

你不能使用AddDefaultIdentity,因为在内部,这调用AddDefaultUI,其中包含您不需要的 Razor Pages“端点”。你需要使用AddIdentity<TUser, TRole> or AddIdentityCore<TUser>反而。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何删除默认的 ASP.NET Core Identity 端点? 的相关文章

  • 以文化中立的方式将字符串拆分为单词

    我提出了下面的方法 旨在将可变长度的文本拆分为单词数组 以进行进一步的全文索引处理 删除停止词 然后进行词干分析 结果似乎不错 但我想听听关于这种实现对于不同语言的文本的可靠性的意见 您会建议使用正则表达式来代替吗 请注意 我选择不使用 S
  • 为什么 C# Array.BinarySearch 这么快?

    我已经实施了一个很简单用于在整数数组中查找整数的 C 中的 binarySearch 实现 二分查找 static int binarySearch int arr int i int low 0 high arr Length 1 mid
  • 在结构中使用 typedef 枚举并避免类型混合警告

    我正在使用 C99 我的编译器是 IAR Embedded workbench 但我认为这个问题对于其他一些编译器也有效 我有一个 typedef 枚举 其中包含一些项目 并且我向该新类型的结构添加了一个元素 typedef enum fo
  • asp.net core / kestrel中的线程管理

    我正在解决我们已迁移到 asp net core 2 0 的 asp net 应用程序的性能 可扩展性问题 我们的应用程序作为应用程序服务托管在 azure 上 并且在任何中等流量的情况下都很容易崩溃 让我困惑的一件事是如何处理多个并发请求
  • 用于检查类是否具有运算符/成员的 C++ 类型特征[重复]

    这个问题在这里已经有答案了 可能的重复 是否可以编写一个 C 模板来检查函数是否存在 https stackoverflow com questions 257288 is it possible to write a c template
  • 为什么当实例化新的游戏对象时,它没有向它们添加标签? [复制]

    这个问题在这里已经有答案了 using System Collections using System Collections Generic using UnityEngine public class Test MonoBehaviou
  • 从Web API同步调用外部api

    我需要从我的 Web API 2 控制器调用外部 api 类似于此处的要求 使用 HttpClient 从 Web API 操作调用外部 HTTP 服务 https stackoverflow com questions 13222998
  • HTTPWebResponse 响应字符串被截断

    应用程序正在与 REST 服务通信 Fiddler 显示作为 Apps 响应传入的完整良好 XML 响应 该应用程序位于法属波利尼西亚 在新西兰也有一个相同的副本 因此主要嫌疑人似乎在编码 但我们已经检查过 但空手而归 查看流读取器的输出字
  • 将 VSIX 功能添加到 C# 类库

    我有一个现有的单文件生成器 位于 C 类库中 如何将 VSIX 项目级功能添加到此项目 最终目标是编译我的类库项目并获得 VSIX 我实际上是在回答我自己的问题 这与Visual Studio 2017 中的单文件生成器更改 https s
  • 使用 WebClient 时出现 System.Net.WebException:无法创建 SSL/TLS 安全通道

    当我执行以下代码时 System Net ServicePointManager ServerCertificateValidationCallback sender certificate chain errors gt return t
  • WCF 中 SOAP 消息的数字签名

    我在 4 0 中有一个 WCF 服务 我需要向 SOAP 响应添加数字签名 我不太确定实际上应该如何完成 我相信响应应该类似于下面的链接中显示的内容 https spaces internet2 edu display ISWG Signe
  • 显示UnityWebRequest的进度

    我正在尝试使用下载 assetbundle统一网络请求 https docs unity3d com ScriptReference Networking UnityWebRequest GetAssetBundle html并显示进度 根
  • 垃圾收集器是否在单独的进程中运行?

    垃圾收集器是否在单独的进程中启动 例如 如果我们尝试测量某段代码所花费的进程时间 并且在此期间垃圾收集器开始收集 它会在新进程上启动还是在同一进程中启动 它的工作原理如下吗 Code Process 1 gt Garbage Collect
  • 这些作业之间是否存在顺序点?

    以下代码中的两个赋值之间是否存在序列点 f f x 1 1 x 2 不 没有 在这种情况下 标准确实是含糊不清的 如果你想确认这一点 gcc 有这个非常酷的选项 Wsequence point在这种情况下 它会警告您该操作可能未定义
  • 如何将带有 IP 地址的连接字符串放入 web.config 文件中?

    我们当前在 web config 文件中使用以下连接字符串 add name DBConnectionString connectionString Data Source ourServer Initial Catalog ourDB P
  • C# 模拟VolumeMute按下

    我得到以下代码来模拟音量静音按键 DllImport coredll dll SetLastError true static extern void keybd event byte bVk byte bScan int dwFlags
  • C# - OutOfMemoryException 在 JSON 文件上保存列表

    我正在尝试保存压力图的流数据 基本上我有一个压力矩阵定义为 double pressureMatrix new double e Data GetLength 0 e Data GetLength 1 基本上 我得到了其中之一pressur
  • Windows 和 Linux 上的线程

    我在互联网上看到过在 Windows 上使用 C 制作多线程应用程序的教程 以及在 Linux 上执行相同操作的其他教程 但不能同时用于两者 是否存在即使在 Linux 或 Windows 上编译也能工作的函数 您需要使用一个包含两者的实现
  • 如何防止用户控件表单在 C# 中处理键盘输入(箭头键)

    我的用户控件包含其他可以选择的控件 我想实现使用箭头键导航子控件的方法 问题是家长控制拦截箭头键并使用它来滚动其视图什么是我想避免的事情 我想自己解决控制内容的导航问题 我如何控制由箭头键引起的标准行为 提前致谢 MTH 这通常是通过重写
  • 使用.NET技术录制屏幕视频[关闭]

    Closed 这个问题正在寻求书籍 工具 软件库等的推荐 不满足堆栈溢出指南 help closed questions 目前不接受答案 有没有一种方法可以使用 NET 技术来录制屏幕 无论是桌面还是窗口 我的目标是免费的 我喜欢小型 低

随机推荐

  • 无法在 codeigniter 中发送 AUTH LOGIN 命令

    每次我尝试发送电子邮件时都会收到一堆错误 hello The following SMTP error was encountered Failed to send AUTH LOGIN command Error from The fol
  • 在Python中寻找跨平台的类似rsync的功能,例如rsync.py

    我正在用 python 实现备份脚本 我正在努力保持跨平台 我听说有一个基于 python 的 rsync 实现 http pypi python org pypi rsync py http pypi python org pypi rs
  • 如何优雅地将“嵌套”哈希符号化_keys

    考虑以下代码 hash1 one gt 1 two gt 2 three gt 3 hash2 hash1 reduce h k v h merge k gt hash1 hash3 hash2 reduce h k v h merge k
  • JDialog setVisible(false) 与 dispose()

    在对话框上使用 setVisible false 并稍后重用它是否有意义 或者每次调用 dispose 并创建一个新的 JDialog 更安全 setVisible false 的内存泄漏怎么办 编辑 我的问题并不是关于退出应用程序 有关以
  • MPMoviePlayerPlaybackDidFinishNotification 在不应调用时被调用

    根据 Apple 的 MPMoviePlayerController 文档 MPMoviePlayerPlaybackDidFinishNotification 如果电影播放器 以全屏模式显示并且用户点击 完成 按钮 则不会发送此通知 在我
  • Servlet Faces Servlet 不可用(richfaces 4、tomcat 7)

    我正在尝试我的第一个 richfaces 项目 因此 我创建了一个新的 JSF 项目 使用 JBoss Tools eclipse 插件 并选择了以下选项 JSF2 0 JSFKickStartWithoutLibs 我没有对生成的示例进行
  • 如何显示图片?

    我在调用图片进行查看时遇到问题 在我的应用程序中 他们单击按钮后 我想将他们带到一个新页面 其中将显示图片并在其下方显示一些文本 对于这个例子 如果狗位于页面顶部 那么我想要一张图片 然后在它下面说我想要诸如品种和品种成本之类的东西 谁能帮
  • 我怎样才能修复“&需要左值”[关闭]

    Closed 这个问题需要调试细节 help minimal reproducible example 目前不接受答案 所以 我创建了一个项目并复制本教程 https github com microsoft DirectX Graphic
  • 在列表中使用两种单独的字符串类型

    好的 对于我的 C 编程课程 我正在制作一款冒险游戏 我想我明白如何做大部分事情 但我在建立 世界 时遇到了困难 我有一个面向世界的课程 World cs 我开始为每个房间创建一个列表 然而 我很困惑为每个房间添加名称和描述 例如 如果Li
  • 可见命令出现在上下文菜单中的时间

    我正在尝试使用 menuContribution 中的 visibleWhen 表达式配置上下文菜单中命令的可见性 我想做的是仅当您执行以下操作时才使该命令在上下文菜单中可见 在资源视图 或包视图 中右键单击某些文件类型 资源 右键单击已打
  • 使用 tkinter 创建椭圆形的流畅运动

    我正在尝试使用 tkinter 创建 Connect Four 一旦圆盘被放置在特定的柱中 我希望它以流体运动下降到柱的底部 我尝试过使用 Canvas 类的移动命令 但我不确定我是否使用错误 或者也许我最好在每次迭代中删除并重新绘制椭圆形
  • 仅对带有 Pandas 的字符串列应用转换,忽略数值数据

    所以 我有一个相当大的数据框 有 85 列和近 90 000 行 我想在所有数据框中使用 str lower 但是 有几列包含数字数据 有一个简单的解决方案吗 gt df A B C 0 10 John Dog 1 12 Jack Cat
  • 使用 Vue.JS 删除多维数组内的值

    早上好 我有以下表格 当您单击 新项目 按钮时 一个新的文本字段将添加到相关部分 如果单击 新部分 按钮 则会创建一个新部分 当您单击该部分右上角的 X 时 该部分将成功删除 但是 我正在尝试实现每个 添加 文本字段下方 右侧 的 X 我想
  • Python:按日期对列表进行排序?

    是否可以按日期对列表进行排序 它用于流程图 因此必须以较小列表对的列表格式进行组织 我希望能够按日期排序 2014 5 29 19 2014 5 28 16 2014 5 30 20 2014 5 23 16 2014 5 22 1225
  • 如何在 Web 应用程序中实现 REST?

    我想知道如何在我的 Web 应用程序中实现 REST 我想创建一个基于此服务的网络应用程序 但我不知道该怎么做 现在 我使用 J2EE 和 Tomcat 这些技术应该考虑哪些因素 EDIT 抱歉 我的意思是 RESTful 服务 REST
  • CSS 中的动态气泡

    I m trying to make something like this 我想使用纯CSS Bootstrap v3 已加载 我已经非常接近类似的事情了 bubble position relative left 15px paddin
  • 如何为 @Html.ActionLink cshtml 页面中新打开的选项卡的标题设置名称

    我当前的代码在Index cshtml page Html ActionLinks Html ActionLink objList Name Name ControllerName new Id objList Id new target
  • 在 web.xml 中使用 JSF EL 表达式

    我可以在 web xml 中使用 EL 表达式吗 像这样 Web xml
  • 如果父类没有实现可序列化,则序列化子类?

    public class Employee2 extends Employee1 public class Employee1 extends Employee0 public class Employee0 现在我序列化 Employee
  • 如何删除默认的 ASP.NET Core Identity 端点?

    假设我想编写自己的登录 注销端点及其视图 但由于某种原因 我正在努力删除现有端点 每当我删除可能与这些端点相关的内容时 它们就会重新创建自己并返回默认视图 基本上我想删除尽可能多的从 ASP NET Core Identity 生成的默认端