We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,278 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

How to create a user for another application

Hello,

Is there a way to create a user using Membership.CreateUser for another application?

I have tho websites (A and B) and when I create a user for website A I need a user to be created B also. I can't link them to use the same database. Is there a way to specify the application or the database where a user should be created. I thought this issue would be fairly common, but can't find any clues anywhere.

All help much appreciated.

minbor

3
Contributors
5
Replies
1 Day
Discussion Span
9 Months Ago
Last Updated
6
Views
Question
Answered
minbor
Newbie Poster
22 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

why not use the same membership database for both applications?

nakor77
Junior Poster
135 posts since Sep 2011
Reputation Points: 31
Solved Threads: 33
Skill Endorsements: 3

Hi,
Thanks for you reply. As I mentioned in my post, I can't do that (not allowed).

minbor
Newbie Poster
22 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

I think you can only do that if you specify another Provider. Is accessing the other database from code allowed? Another option would be to write a database trigger on A (assuming they share a local user).

pritaeas
Posting Prodigy
Moderator
9,309 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,465
Skill Endorsements: 86

Here's a link for using multiple membership providers:

http://stackoverflow.com/questions/5342158/using-multiple-membership-providers-within-asp-net-mvc-3-application

if you want to give that a try

nakor77
Junior Poster
135 posts since Sep 2011
Reputation Points: 31
Solved Threads: 33
Skill Endorsements: 3

Using a second membership provider to connect to the other website's database worked.

Thank You very much.

minbor
Newbie Poster
22 posts since Oct 2007
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0
Question Answered as of 9 Months Ago by nakor77 and pritaeas

This question has already been solved: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0934 seconds using 2.65MB