Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/asp.net-core/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql server 如何在Asp.Net Core中将FailoverPartner添加到连接字符串中_Sql Server_Asp.net Core - Fatal编程技术网

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

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

我正在尝试将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添加到末尾没有效果


有办法吗?

你说的“没有效果”是什么意思。期望的结果是什么?错误是什么?无效意味着当第一台服务器不可用时,它不会转到故障转移伙伴。