Last post Jan 18, 2018 09:47 AM by Edward Z
Jan 17, 2018 11:42 AM|Frank_Cannon|LINK
I am trying to connect to a database on a server that operates as part of a pair. If one server is down the other is there as a backup (Failover Partner). Replication is enabled between databases on the two servers.
In Asp.Net Framework I could use the following connection string in the web.config. As can be seen it contains a part for the Failover Settings:
However, If I add "Failover Partner=yyyyyy.ad.xxxx.co.uk" to the Connection String in AppSettings.Staging.json it has no effect.
What is the equivalent in Asp.Net Core ? Has this been implemented somewhere else or has it been missed?
Jan 18, 2018 05:29 AM|Edward Z|LINK
>> What is the equivalent in Asp.Net Core ? Has this been implemented somewhere else or has it been missed?
I am afraid it is not supported currently.
Connect Clients to a Database Mirroring Session, a client can use either SQL Server Native Client or .NET Framework Data Provider for SQL Server.
But Database Providers for Entity Framework Core does not support any of them.
I would suggest you submit an issue on below:
Jan 18, 2018 08:15 AM|Frank_Cannon|LINK
Hi Edward Z
Can you delete your answer please? Although your link defines how you would configure connection strings in a web.config file, it isn't relevant to my question.
My question is about Asp.Net Core and what is currently supported in AppSettings.Json which doesnt seem to be all of the settings in web.config.
Also my question has nothing to do with EF core.
Thanks all the same
Jan 18, 2018 09:47 AM|Edward Z|LINK
>>my question has nothing to do with EF core
How did you use Connection String in Asp.net Core? Did you use similiar code like below:
services.AddDbContext<ApplicationDbContext>(options => options.UseSqlServer(Configuration.GetConnectionString("DefaultConnection")));
I am wondering what you mean that your question has nothing to do with EF Core, above code is using Microsoft.EntityFrameworkCore.
Do you mean you did not use above code to access database?