I'm trying to connect to the local database instance that visual studios provides, I setup a connection string in the appsettings.json
however, it keeps failing at the integrated security keyword, it says it doesn't exist. However if I take it out, the response gets a timeout because there was no pre-authorization handshake which is because I set my dbcontext
to identitydbcontext
so I would need to specify the integrated security = true keyword but alas I'm stuck
This is the default connection string:
"DefaultConnection":"Server=(localdb)\\\\
mssqllocaldb;Database=ChatAppTr;MultipleActiveResultSets=true;
Integrated Security=True;"
This is how I setup the database context for my web app:
///Specify what type of user you want in identity context:
public class AppDbContext : IdentityDbContext<User>
{
public AppDbContext(DbContextOptions<AppDbContext> options) :
base( options){ }
/// Registers models to AppdbContext
public DbSet<Chat> Chats { get; set; }
public DbSet<Messages> Messages { get; set; }
}
}
I expected it to just connect to the localdb
instance but nothing happened.