MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Possible integration with another database (Closed) (Mono Support )

Viewed 67460 time(s), 6 post(s) 7/30/2011 8:16:14 AMby NaveedAnjum

Related topics

NaveedAnjum

NaveedAnjum

7/30/2011 8:16:14 AM
I have another database on SQL Server and have a number of customers stored in that database. Now i want to use that customer information in monox community site so that they becomes community member.

My question is what are the possible integration options with another database in monox ?
This content has not been rated yet. 
36 Reputation 3 Total posts
khorvat

khorvat

7/30/2011 8:31:58 AM
Hi,

I think the best way to approach this is to implement custom Membership provider (on top of MonoSoftware.MonoX.MonoXMembershipProvider which inherits AspNetSqlMembershipProvider) and custom Role manager (on top MonoSoftware.MonoX.MonoXRoleProvider which inherits AspNetSqlRoleProvider). That way you can use MonoX database for the CMS and your own database for the user management. 

If you choose this approach let us know so we can provide you with the additional information that you will need to perform this task.

Some references that may help

Introduction to Membership
You can read more about extending ASP.NET membership here.

Regards
Rated 3.50, 2 vote(s). 
15993 Reputation 2214 Total posts
denis

denis

7/30/2011 4:00:10 PM
The Membership and Role provider strategy Kristijan recommended is the easiest and the most elegant approach to ASP.NET application integration (it is also used to communicate with other authentication systems like ActiveDirectory, or other databases like MySQL or Oracle). Here is another article that can help you understand the basic principles: Membership and Role providers in ASP.NET 2.0.
This content has not been rated yet. 
7207 Reputation 956 Total posts
NaveedAnjum

NaveedAnjum

8/1/2011 6:21:31 AM
Thanks khorvat and denis for quick reply. When i will integrate it with our custom DB i will let you know.

This content has not been rated yet. 
36 Reputation 3 Total posts
shawndg

shawndg

8/1/2011 11:45:50 AM
I don't know how much you already have that you want to cross over.

But.. IT is fully possible to also do a database conversion script to pull a list of customer from your old database and insert them into the MonoX aspnet_users table. I'm not 100% sure on the name right off hand but you could do it.

You could also then build your own ext table and store any extra customer data the user has and then to display it or allow MonoX users to edit it or even register using it.. You would extend the MonoX registration system.
This content has not been rated yet. 
1871 Reputation 252 Total posts
khorvat

khorvat

8/2/2011 8:58:33 AM
Hi,

just a small note, if you proceed with the Shawndg suggestion you will also need to import data in the aspnet_mebership DB table as aspnet_users and aspnet_membership are tightly connected.

BTW there is also a UserProfile DB table that you can use to store an extra customer data.

Regards
This content has not been rated yet. 
15993 Reputation 2214 Total posts