title: Most secure way for web application user authentication
body: <p>I have a blazor server-side web application that needs to authenticate users using their usernames and passwords. I don't know how to store these usernames and passwords. I found some ways but I want to know which of these ways are the most secure and efficient ways. Is it better to store them in a SQL database and access them safely or store them I a file like a JSON or XML file? If I store them in a SQL database, how would I connect to it safely? Is the entity framework a good choice?
  If I store them in a file how would I encrypt that file? Which ways are the best encryption ways? I also found a way that I think it's simpler but I don't know is it a good and safe way or not. So if this way isn't a good choice, tell me why.</p>
  <p><em><strong>My way</strong></em>: Storing usernames and passwords without encryption in a JSON file and place that JSON file in another location of my website in the server (EX: F:\PSW\data.json) and read that from my website so anyone that wants to access that file should hack my server completely. So please tell me which of these ways are best and what are the pros and cons of each way. And please let me know if you know a better way.</p>