Using ASP.NET Identity can you make calls to a Web API instead of the default database? If so, how would you go about it?
Asked
Active
Viewed 156 times
0
-
That is very broad. Check out [Overview of Custom Storage Providers for ASP.NET Identity](https://learn.microsoft.com/en-us/aspnet/identity/overview/extensibility/overview-of-custom-storage-providers-for-aspnet-identity). You are basically going to need a custom storage provider that would call the web api. – Nkosi Jul 02 '17 at 17:18
1 Answers
0
as i understand, you want to use custom database for identity.
<connectionStrings>
<!-- Asp.Net Identity Context -->
<add name="MyConnection" connectionString="Data Source=.;Initial Catalog=YourDatabaseName;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings>
IdentityModels.cs
public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{
public ApplicationDbContext()
: base("MyConnection", throwIfV1Schema: false)
{
}
and Update-Database

anıl yıldırım
- 953
- 1
- 10
- 17