查看微软新的 ElasticScale,需要做一个 multiSharedConnection。不幸的是,出现了这个错误:
DataSource must not be set in the connectionStringBuilder
我的代码很简单:
var aa = shardMap.GetShards(); // vars are for debuging
var ba = connstring;
using (MultiShardConnection conn = new MultiShardConnection(aa,ba ))
在调试时 connstring 有这个值:
"Server=tcp:MYSERVER.database.windows.net,1433;
User ID=nikatlas@MYSERVER;Password=MYPASS;
Trusted_Connection=False;Encrypt=True;Connection Timeout=30;"
有任何想法吗 ?