I'd like two websites to have read/write access to the same user profile database (named "aspnetdb" by default). Presumably this is possible by configuring the websites appropriately in the web.config. Are there any issues I should be wary of?
+3
A:
Yes you may.
You need to ensure that each app has a common machineKey section in web.config so that cookies and other encryption is same for all.
Did you want both apps to use the same users/profiles? If so, you must ensure that the applicationName
attribute in all of the provider sections is the same. Typically this value defaults to '/' so there should be no modifications necessary except for the common machineKey
section.
If you wish to use the same database but wish to keep the membership separate, simply specify different applicationName
attributes for each application.
So, yes, you may have multiple applications use the same database and/or same user data by appropriate configuration.
Sky Sanders
2010-04-30 08:55:03
Great answer - I suspected the app name and machine key would come into it. Thanks.
Ben Aston
2010-04-30 09:10:45