Visual Basic MVC application secured login

Peter Newman 66 Reputation points
2024-02-08T13:37:55.2833333+00:00

I've been trying to create a MVC project using an existing SQL database with login security. I've looked at Identity and cookies but am unsure of the best approach and how to accomplish this in VB ( all examples seem to be in C#) . I'd also want to be able to log the users off if they close the browser window. Can anyone point me in the direction of a tutorial VS2022

ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,494 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,576 Reputation points
    2024-02-08T18:59:48.5966667+00:00

    VB and MVC is not a popular combo (plus vb is not supported in the current version). custom authorization is an advanced topic so you will probably not find a vb example, you will need to translate the c# code.

    if you just need simple cookie authenication, see this sample:

    https://www.aspsnippets.com/Articles/2436/Implement-Custom-Authentication-and-Authorization-in-ASPNet-MVC/

    0 comments No comments

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.