Sql server 如何在Asp.Net Core中将FailoverPartner添加到连接字符串中
我正在尝试将FailoverPartner添加到asp.net核心应用程序的连接字符串中 FailoverPartner在asp.net中web.config文件中的连接字符串中工作,例如Sql server 如何在Asp.Net Core中将FailoverPartner添加到连接字符串中,sql-server,asp.net-core,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" 我已经将sq
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添加到末尾没有效果
有办法吗?你说的“没有效果”是什么意思。期望的结果是什么?错误是什么?无效意味着当第一台服务器不可用时,它不会转到故障转移伙伴。