I believe that you will need to write your own code (e.g. a custom stored procedure) to get the identifier. This data is intended for private use by the embedded implementation of the membership provider and is not part of the provider interface (i.e., it may not exist in some provider implementations). The same goes for user ID. The good news is that storing a stored procedure for a default implementation is pretty straightforward.
You just need to:
SELECT ApplicationId FROM aspnet_Applications
WHERE ApplicationName =
(System.Web.Security.Membership.Provider.ApplicationName
from the ASP.NET code)
You might want to rethink if you really need this identifier.
source
share