Membership with Microsoft Access - asp.net-mvc

I'm doing project in asp.net mvc with Micorsoft Access database and I need to figure out how to make a login system and roles with Microsoft Access.
I have seen some examples on the web:
http://binarywater.com/OleDbASPNETMembershipProvider.html
http://imar.spaanjaars.com/QuickDocId.aspx?quickdoc=404
I want to understand if they are examples that can be used in asp.nt mvc frmework 1.0 with 3.5.
Because the first link talks about asp.net 2.0 and also create the DataBase aspnetDB.mdb how do I use tables in my db?
You want to be one of your suggestions
Thanks again for your help

you have to write your custom MembershipProvider for your access database
or try to find one on the internet...
asp.net versions are different from the mvc versions
mvc framework 1 runs on .net 2.0 runtime....

Related

How to use Asp.net MVC Core with Asp.net Identity Core and WebAPi Core?

I am going to create an web app using Dot Net Core. In future, i will also create mobile application for the same application. Now, i am in thinking the architecture of the project. I want to use WEB API core using Asp.net Identity Core. Also, i will consume WEB API in MVC Core application. But the question i have in mind that how i can handle ASP.net identity with MVC and WEB API? Do i need to include in MVC as well or only in WEB API?
I tried to think hard but still confuse. Need suggestions.
You can use token based authentication .
In a resource owner flow scenario , your client app( mvc application/native application) will consume your web api by providing user's credential , web api will validate the credential(using ASP.NET Core Identity) in database , If the username and password are correct then a JWT authentication token and the user details are returned. Your client app could validate the token and sign in user :
ASP.NET Core 2.2 - JWT Authentication Tutorial with Example API
Tutorial built with
Token Authentication in ASP.NET Core 2.0 - A Complete Guide
In addition, IdentityServer4 is a good choice when you want to roll your own full-fledged OpenID Connect authorization server that can handle complex use cases like federation and single sign-on.
So your question is maybe a bit open-ended for Stackoverflow and you don't really show what you have tried so far.
I will try to answer though. First you just need to start out with a template for your project. Start an MVC project in which you can easily have API endpoints as well. I would suggest splitting those in two projects for clarity - but if it is just a small personal project then you probably are fine having them in the same project. Microsoft have a pretty good resource on MVC:
Microsoft MVC walkthrough
For the Identity part. You would need some kind of authority for it to work. I suggest you take a look at IdentityServer4. Which offers an excellent walk-through of how to set it up and how to integrate it with Asp.NET Core Identity:
IdentityServer4

ASP.NET Identity 2.x with external REST web service as user/role store

I'd like to use ASP.NET Identity 2.x (.NET 4.6.1 / MVC5), without talking to a database directly through Entity Framework, but instead using an external (REST) web service as the source of users and roles. I've read up a little bit on this already, but I was just curious if anyone knows what would be the minimum interfaces to implement. I would assume IUserStore and IRoleStore would be absolute minimum, correct?
I'm aware of these resources:
Simple Asp.net Identity Core Without Entity Framework
Exorcising Entity Framework from ASP.NET Identity
ASP.NET Identity w/o Entity Framework
...but nobody particularly talked about using a web service, and they're mainly focusing on just not using EF, but are still using a DB of some kind directly. I am curious if anyone has tried this with a web service and has come across any pitfalls?

How do I enable OAuth with my existing MVC application?

I have an SQL Server database with a MVC 4 internet application. How do I use OAuth with my existing database and existing user table (unfortunately called 'Customer'). I'm trying to avoid changing as much as I can. Does anyone have any helpful information?
Take a look at DotNetOpenAuth. It's shipped with VS2012, is available via NuGet, and seems to be geared more toward the ASP.NET MVC audience than simpler WCF setups.

Authentication from Asp.Net Mvc4 Project to Another Asp.Net Webapi Project, backed by SQL Server CE 4

I've been searching for an answer to my question for a while now, but can't find what I'm looking for so I hope someone can help me :)
Scenario:
3 Projects:
Asp.net Web Api Project (SQL Server CE 4 database + Asp.Net Membership)
Windows Phone 7.5 App (Authenticates to the SQL Server CE database using REST)
Asp.net MVC 4 Project (That wants to communicate to the same SQL Server CE database, also using REST)
The WP7 app's authentications is already working. But I'm having problems with trying to figure out on how to let my MVC app authenticate with the same SQL Server CE database.
I'm probably able to create my own controls and use the same logic to authenticate that I've used in the WP7 app, but I want to keep the existing functionality that the [Authorize] attribute offers.
So my question is:
how can I let my MVC project authenticate through the Web Api project, and still maintain the functionality that when a user tries to access a page that needs authentication, he will be redirected to the login page and such
I hope my question is clear enough! If not, don't hesitate to ask some additional questions!
Kind Regards,
Gert
Ok, after some rest and some logical thinking, I just realized that I had to change the Login method in the AccountController in the MVC project.
I'm not able to provide any code because I'm not on my dev pc, but it's just any authentication code you would use anywhere else. For example using REST authentication or authentication through a WCF service.
Kind regards,
Gert

Need to make ASP.NET MVC website with MySql Database and membership

I need to set up an asp.net mvc website in which all user information is to be stored in mysql database and user authentication needs to implemented. The MySql database on located on a web hosting.
Till now, I have only relied on the default asp.net mvc project provided in visual studio and do not know much on how to setup membership and login functionality for a website.
Can anyone please advice where to start looking.
Thanks.
Here is a link with custom membership providers for MySql.
You will have to register them in Web.Config. Linked article explains well though.
When in doubt you can always refer to the sample Microsoft implementation. Their source is available here
I've done several sites with custom membership providers.
If you want to use something non-typical, like MySQL in .NET, I would suggest that you at least make it as much non-typical-part-agnostic as possible. In your example, that would be membership provider based on DB-agnostic data access, that is Entity Framework. Then you can even "switch" your underlying DB later without pain.
Look here :
http://efmembership.codeplex.com/
http://www.codeproject.com/KB/web-security/EFMembershipProvider.aspx

Resources