I am having problems processing multiple membership providers on the same site.
I have a registration page that creates a user and adds him to the AD domain. Before I got one provider member, and on the page that I called
Membership.CreateUser(txtUsername.Text, txtPassword.Text)
who created the username based on the user inputs on the page.
However, I added another membership provider to web.config so that the login page can be used to login from another AD. Now my registration page will not work because (I assume) there are two membership providers?
How can i fix this? How to specify which provider to use when calling Memberhip.CreateUser?
Thanks.
Edit:
The correct way to do this is as follows:
MembershipCreateStatus newStatus = new MembershipCreateStatus(); Membership.Providers["ProviderName"].CreateUser(txtUserName.Text, txtPassword.Text, null, null, null, true,null, out newStatus);
Thanks!
source share