如何在Asp.Net Core中将FailoverPartner添加到连接字符串

时间:2018-01-08 16:19:41

标签: sql-server asp.net-core

我正在尝试将FailoverPartner添加到asp.net核心应用程序的连接字符串中。

FailoverPartner在asp.net中的web.config文件中的连接字符串中工作,例如

ConnectionString="Data Source=xxxxxxx.ad.xxxx.co.uk;Failover 
Partner=yyyyyy.ad.xxxx.co.uk;Initial Catalog=DatabaseName; 
Integrated Security=SSPI"

我已将sql server的基本设置添加到appsettings.json和appsettings.staging.json,这样可以正常工作,例如

"ConnectionStrings": {
    "DefaultConnection": "Server=XXXXXX.ad.XXXX.co.uk;Database=DatabaseName;Trusted_Connection=True;Failover Partner=yyyyyy.ad.xxxx.co.uk"
  }

但是,将FailoverPartner添加到最后没有任何效果。

有办法吗?

0 个答案:

没有答案