Sql server 2014, Entity 6.1.2 infrastructure, .net framework 4.5, IIS 8, database mirror in enhanced security mode without a witness.
I have the following connection string
Data Source=A;Failover Partner=B;Initial Catalog=DB;Integrated Security=False;User Id=sa;Password=Password;MultipleActiveResultSets=true;Connect Timeout=10
Starting from: A = Principle, B = Mirror
And when I perform a manual transition from A to B (mirroring principle), it crashes with the inability to open the connection - Erro 40.
Starting from: A = Mirror, B = Principle
Manual fail-safe operation.
Now: A = Principle, B = Mirror
Then I do not restart the site, returning again, Error 40.
Restart IIS, stop working again.
Here is the code to test the connection:
while (!_exitFlag)
{
using (var context = new EntityContext())
{
var result = context.Foos.Count();
}
}
Any ideas?