How to implement two-factor authentication in Asp. Net web forms

Sherpa 306 Reputation points
2024-03-13T20:50:47.29+00:00

Hi,

We have an old Asp.Net web forms application. Currently, it has a login page where the user will enter a username and password which will be verified against saved values in the SQL server database. Our management wants to implement a two-factor authentication on the website. I know how to use identity-based two-factor authentication in an asp.net core, however, I don't know how to implement the same on a web form. I searched Google and YouTube but couldn't find any useful links. I saw this on YouTube, but it describes mostly theory on the subject but no source code is provided: https://www.youtube.com/watch?v=2SIYclIN2jI&list=PLIoX3-mcY80gmA0hh9zrldIEwjOzCWqTY&index=1&ab_channel=RGEdu

Thanks

Microsoft Security | Microsoft Authenticator
Developer technologies | ASP.NET | Other
{count} votes

Accepted answer
  1. Lan Huang-MSFT 30,186 Reputation points Microsoft External Staff
    2024-03-14T06:58:57.77+00:00

    Hi @Sherpa,

    Maybe you could try using ASP.NET Identity.

    Microsoft official documentation provides relevant tutorials, I hope it will be helpful to you.

    Create an ASP.NET Web Forms app with SMS Two-Factor Authentication (C#)

    Two-factor authentication using SMS and email with ASP.NET Identity

    Best regards,
    Lan Huang


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.