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.

Integrating MonoX with another database  (Closed) (Mono Support )

Viewed 9352 time(s), 5 post(s) 1/20/2014 2:40:56 PMby logu

Related topics

logu

logu

1/20/2014 2:40:56 PM
Hi, I am trying to implement monox with our existing webapp to use the socialnetwork features. I have a database with users and password I would like to use the existing credential to connect to a monox. I sent an email, I received a reply From Denis telling me that the best approach is to buld a custom ASP.NET membership provider that would use the existing database for authentication purposes and he gave mes the following link  :
http://www.mono-software.com/Mono/Pages/Discussion/dtopic/xk2soFQjTEW7aZ8wAKcFng/Possible-integration-with-another-database/

In this link Khorvat says : 
" 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  "

Do you guys have a tutorial or sample project with an overwrite of the membership provider ? Please

This content has not been rated yet. 
58 Reputation 7 Total posts
pajo

pajo

1/20/2014 3:43:59 PM
Hi,

Membership provider is ASP .NET membership provider and it shouldn't be hard to find tutorials how to build one. You can find basic information how to do it here. But you might have bigger problem here all social network modules will look for users in MonoX table structure, so you must make sure to have a copy of user data there. If all user data will be populated by MonoX and your other database will be used only for validation, it is possible to make it work relatively easy, you would need to import all users in MonoX tables and make sure usernames in both tables are same. Then just override Validate method on MonoXMembershipProvider, implementing your user-passworkd validation there and change default provider in the config .
Rated 5.00, 1 vote(s). 
629 Reputation 83 Total posts
logu

logu

3/11/2014 8:02:42 AM
Hi, 

I managed to get the membership provider to connect using the other database, I am struggling to import Users or create one user. 
My goal is to use the group module in MonoX, We have groups in our app where users have a calender and documents that they can download from. We wanted to Implement a wall, MonoX is perfect for us for that purpose. I am trying to create a MonoX group for each group that we have in our app. Once the group is created I could put a link in our apps group page to the corresponding MonoX group. By clicking the link the user can land on the wall. To do that I need to create groups / users  and link them together. 

could you help us please. 

If I can manage to do this I can convince my team and my boss that we could rebuild our webapp on top of MonoX.

This content has not been rated yet. 
58 Reputation 7 Total posts
logu

logu

3/11/2014 8:02:35 AM
Hi, 
I think I figured it out : 

            var group = GroupAdapter.GetInstance().CreateGroup(groupName);
            var user = UserAdapter.GetInstance().CreateUser(adminUserName, passeword, mail);
            
            GroupAdapter.GetInstance().JoinGroup(group.Id, user.Id);
            GroupRepository.GetInstance().SetGroupMemberAsAdministrator(user.Id,group.Id, true);

Thank you 
This content has not been rated yet. 
58 Reputation 7 Total posts
logu

logu

3/11/2014 8:02:29 AM
Hi all, 

By using the following I managed to create groups : 
var group = GroupAdapter.GetInstance().CreateGroup(groupName);

But I can't find a way to add the created group to a category.
I tried this : 
var categ = GroupCategoryAdapter.GetInstance().UpdateGroupCategory(GroupCategoryAdapter.GetInstance().CreateGroupCategory("MyCategory"));
group.GroupCatagoryId = catId;

It doesn't work
I can create the category but I can't add a group to it.
I have no idea how to update other properties of the group neither (eg: group.Description)

Thank you for your help 
This content has not been rated yet. 
58 Reputation 7 Total posts