0

I am trying to implement Login webpage using asp.net MVC in C# but I want to use MS-access database. The one which is in-built in MVC template uses MS-SQL database. What can be the changes I need to do in achieving this.

Please reply.

user2801336
  • 187
  • 1
  • 2
  • 10
  • Which version of MVC and what the out-of-the-box components are will be very important for this. But, at a high level, what you're looking to do is create a custom membership/role/identity/etc. provider. – David Apr 15 '15 at 23:11
  • http://programmers.stackexchange.com/questions/221014/is-there-a-downside-to-using-access-as-a-database http://stackoverflow.com/questions/694921/ms-access-mdb-concurrency – spender Apr 15 '15 at 23:18
  • I have created table in MS-Access for username and password and wanted to implement login for that using MVC. Version of MVC is 5. I am thinking to create a folder database and adding a class to write query which can match username and password. But I dont understand how to modify rest of the structure of MVC so when login button is submitted it control should go to newly created database folder class and match the credentials – user2801336 Apr 15 '15 at 23:22
  • 1
    Further to the comments from @spender there is also [this MSDN article](https://msdn.microsoft.com/en-us/library/jj653753.aspx#access_database). TL;DR: "How can I do this?" -- You shouldn't. – Gord Thompson Apr 15 '15 at 23:30
  • "I have created table in MS-Access for username and password" You've already gone wrong. Storing the password in the database? This runs against all accepted security practices. Why don't you have a go at getting a more standard setup running from the site templates in Visual Studio so that you can at least get a bit of insight into what's involved in writing a robust and secure login system. It's super hard to get right, and if you think that storing passwords in the database is a good idea then it's clear that you need to do a considerable bit of learning before you proceed. – spender Apr 15 '15 at 23:56
  • IMO, unless you have very specific needs, writing your own login system is completely unwarranted. It's a solved problem. You're putting the cart before the horse simply because you have a few columns in an access db. Solve a different problem. This one is a colossal waste of time. – spender Apr 16 '15 at 00:01

1 Answers1

0

Here is a how-to from MS about doing this on MVC5. I suggest taking the time to go through this and learning the best practices before you try to hack your way to fame and fortune. The only other thing i can say here is to never ever store a password, always store it's hash value.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
  • Link shows how to do it with SQL database. I wanted to implement it in ACCESS database – user2801336 Apr 15 '15 at 23:42
  • Link shows how to do it right. Swap out your database once you've actually gone through the tutorial if you are still hell bent on Access. Waiting around for someone to help you hack your way around learning this stuff is not doing you, your company or your users any good. Good luck and happy trials. – Curt Tabor Apr 16 '15 at 00:57