Last post Dec 02, 2013 01:30 PM by anas
Nov 28, 2013 06:44 AM|Frank_Cannon|LINK
Is the Application table used at all in Microsoft.AspNet.Identity?
In the AspNetUsers table that Microsoft.AspNet.Identity uses (as opposed to System.Web.Security) there is no Application field and there doesn't seem to be any other reference to Application in the other new tables.
Can someone confirm whether I am correct in assuming that Application table is no longer used in the Microsoft.AspNet.Security model or if I am not correct then how is it used?
Thanks for reading
Nov 28, 2013 10:21 PM|Pengzhen Song - MSFT|LINK
When you add new table, you can manually create foreign key with t-sql script like this
CREATE TABLE [dbo].[Table4]
[Id] INT NOT NULL PRIMARY KEY,
[ApplicationId] uniqueidentifier NULL,
CONSTRAINT [Table4] FOREIGN KEY (ApplicationId) REFERENCES [Applications]([ApplicationId])
Hope it can help you.
Nov 29, 2013 11:06 AM|Frank_Cannon|LINK
Thanks for your reply but I don't see how your answer relates to Microsoft.AspNet.Identity .
Can you give further details of how it relates, otherwise it might be better to delete your reply.
Nov 29, 2013 03:24 PM|anas|LINK
If you are asking about the "aspnet_Applications" table that is part of the membership database, then the answer is yes. This is because the Membrership database was designed to allow you to use it for more than one application. So you specify your application
name and the APIs will start using it while creating users/roles or verifiying them.
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
If you want to use the same membership database for another application, you choose different application name for the second app
Dec 01, 2013 01:02 PM|Frank_Cannon|LINK
The above config entry is using System.Web.Security which is not used by Microsoft.AspNet.Identity. Therefore it will have no effect.
Dec 02, 2013 01:30 PM|anas|LINK
To tell you the truth, when I saw your quesiton I wasn't aware about the Microsoft identity addition that was provided in VS 2013 (didn't have the time to try it) . But i read that one of the advantages of using this new membership system is the flexibily
that allows you to cusomize the default attributes of the entities (users, roles). By defualt, the application will not be included, maybe because the new identity model is taking into consideration the could hosting (Azure) which handle the storage per app
by itself. But because of the flexibilty in the new membrship system, you can add the application as a customer field/attribute to the user by creating sub type of the defualt user type.