M
M
Max Maximov2014-07-04 19:14:55
MongoDB
Max Maximov, 2014-07-04 19:14:55

How to change ASP.NET Identity base from SQL-Server to MongoDB?

Hello.
When creating an ASP.NET MVC 5 project, you can select ASP.NET Identity. As you know, all the logic with cookies and other things is already written there. The only thing I want to change is to completely remove SQl-Server from there and use MongoDB. I found about the Membership Provider on the net, but there are a lot of complaints about this technology.
Please share recommendations, instructions or advice.
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Max Maksimov, 2014-07-17
@maximka19

In general, I could not cope with the repository pattern, as @Eugene22 recommended to me .
I solved the problem as follows:
I created an ASP.NET MVC 5 project, installed the MVC 5.2 update , then installed Identity 2.0 (along with examples, the last command in the list), then removed the packages related to the Entity Framework.
MongoDB providers for ASP.NET Identity were very few -- just 2. I've tried both. I liked the implementation of this provider more + it supports ASP.NET Identity 2.0. I just installed it, follow the tutorials on github and its example .
After the work done, I still managed to link ASP.NET Identity 2.0 with MongoDB.

E
Eugene, 2014-07-05
@Eugene22

well, how - you take data from ms sql servera and upload it to mongodb, configure the authorization system as needed, and then work is carried out in the usual way. Here you can see an example of switching between using ms sql server and mongodb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question