简体   繁体   中英

Same membership table for different asp.net application

I have a asp.net website which has form authentication, I have to develop another website which will access the same database for login.

I believe I have to create application ID before going further.

Or when I execute the below statement will create the application id in the aspnet_membership table?

MembershipUser newUser = Membership.CreateUser("UserName", "password", "email@xyz.com");

What could be the best way to deal with it?

You should set it in the Web.config file:

See also ScottGu's blog entry

So in one website, you set the applicationName as "App1" in the Web.config, and in the other one you'll name it "App2".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM