I have not tried it, but I think it will work.
You can have two membership providers (i.e. ASPNETDB_1 and ASPNETDB_2.)
They are listed in the membership provider section of the web.config file. Therefore, you need a separate web.config in each subdirectory, which, as I know, you can do.
At the root of the site, I assume that you will not have authentication. You can only have a start page that asks the user to select a subdirectory (or you can simply use subdomains (firstdir.mysite.com, secondir.mysite.com) or http: /mysite.com/firstdirectory or http: / mysite. Com / secondirectory.
I am not sure about the advantages of this method with respect to virtual directories, although, besides the fact that root can contain some ASP programs that do not require authentication.
I understand that you are looking for a solution "out of the box" and do not want to "minimize your own." However, a standard membership provider allows you to set a profile for each user - then it is very simple to configure one form of user service using a list for each of your individual user service functions and filter by role or profile value (for example, organizational identifier). Using the classes of membership providers, I personally found it very easy to do out of the box (maybe an hour to create support forms, if this is using all drag and drop controls, SqlDatasource + listview - no VB or C encoding is required). But individual providers and webconfigs could do the trick too.
source share