Question

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?

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top