Hello, all.
I'm working on an application, where several products has their own website/application, while everything is stored in one SQL 2008 database.
When someone wants to buy a product (software licenses) they fill out a form and their info is transmitted to another site where all administration and payment is handled.
When the customer has payed with Paypal and is returned to the payment page, their info is saved to database, and a user account is created.
In order to create the user for the correct application, I use the following code to change the application name, create the user there, and change back.
'Change to the relevant application name
Membership.Provider.ApplicationName = BuyNowButton1.AdditionalDataItems("product")
Roles.ApplicationName = BuyNowButton1.AdditionalDataItems("product")
'Create the user in the membership, store additional data ...
Go to the complete details ...