Starts in:
2 DAYS
9 HRS
29 MIN
33 SEC
Starts in:
2 D
9 H
29 M
33 S
Open Closed

logout question #8280


User avatar
0
dhaoo created

提问之前请先查看文档:https://abp.io/docs/latest https://abp.io/docs/latest 查看示例以了解基本任务:https://abp.io/docs/latest/samples 您的问题的认知解决方案可能已经得到解答,请首先使用主页上的搜索。 请向我们提供以下信息: 🧐提示:如果您正在使用 ABP Studio,您可以从配置窗口中看到有关解决方案的所有信息,当您右键单击[解决方案]( https://abp.io/docs/latest/studio/solution -explorer#solution )并单击解决方案配置按钮时,该窗口将打开。

  • ** ABP 框架版本** : v8.1.3。
  • ** UI 类型** : MVC
  • 数据库系统:EF Core
  • 分层(针对 MVC) 或 Auth 服务器分离(针对 Angular):是 异常消息和完整堆栈跟踪更换问题的步骤

在登出的时候可以像登录一样自定义他的方法吗,在登出的时候我想实现一些自己的业务逻辑,需要怎么实现,我尝试了继承LogoutModel 重写了OnGetAsync 但在debug的时候发现登出时并没有进入到这个方法


9 Answer(s)
  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hi

    Can you write it in English?

    Thank you.

  • User Avatar
    0
    dhaoo created

    okay,I want to customize the logout process just like the login process. During logout, I need to implement some of my own business logic. How can I do this? I tried inheriting LogoutModel and overriding the OnGetAsync method, but during debugging, I found that this method is not being triggered during logout.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello ,

    I have created a simple MVC Project and in that project i have created Logout page. In a web project created a Account folder and in that create Logout.cshtml.cs page.

    You can see this screenshot in that debugg was hit when click on logout button.

    You can refer this link https://github.com/abpframework/abp/tree/dev/modules/account/src

    Thank you.

  • User Avatar
    0
    dhaoo created

    hi,

    It seems that it is not applicable in a multi-layer framework. I created the Logout view based on your screenshot and inherited from the AccountPageModel, but it still doesn't enter during debugging.

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello ,

    Can you provide me few steps to reproudce this issue ?

    Thank you.

  • User Avatar
    0
    dhaoo created

    I want to perform some business processing when clicking the logout button on the homepage. How can I override the method after this button is clicked

  • User Avatar
    0
    Anjali_Musmade created
    Support Team Support Team Member

    Hello ,

    I have created Account folder in .web project Can you try this once

    Thank you.

  • User Avatar
    0
    dhaoo created

    hi, I created the LogoutModel according to your method, and when I log out from the Auth layer, I do enter the breakpoint, but when I log out from the web layer, I don't enter the breakpoint.

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    You can try override the LogoutController

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06