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

Recommended Answers

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).

Jump to Post

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

Jump to Post

All 5 Replies

why not use the same membership database for both applications?

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

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).

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

Thank You very much.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.