0

I have a client process which talks to a DB server using Entity Framework. The DB itself has active and passive clusters with always-on setup between them for replication.

Initially, the connection string was based on the listener. I am trying to have the client process talk directly to the passive cluster. In the connection string, I replaced the listener name with the name of the passive cluster.

After this change, the client process does not come up with an error message to the effect that it is not able to reach the DB.

Here is my connection string after changing it to point to passive cluster (Server=CH1BLBCMPDSQL):

Provider=EntityFramework;Contract=ConfigService.DataLayer.KeyValueEntity;Table=Identity.KeyValue;Server=CH1BLBCMPDSQL;Database=Accounts;Username={0};Password={1}

What could be wrong?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Aadith Ramia
  • 10,005
  • 19
  • 67
  • 86

1 Answers1

0

Your connectionstring is not complete. It needs to point to the .edmx (metadata) file(s)

Here are some exampels:

something like:

  <connectionStrings>  
    <add name="Northwind_Entities"  
         connectionString="metadata=res://*/Northwind.csdl|  
                                    res://*/Northwind.ssdl|  
                                    res://*/Northwind.msl;  
                           provider=System.Data.SqlClient;  
                           provider connection string=  
                               &quot;Data Source=.\sqlexpress;  
                                     Initial Catalog=Northwind;  
                                     Integrated Security=True;  
                                     MultipleActiveResultSets=True&quot;"  
         providerName="System.Data.EntityClient"/>  
  </connectionStrings> 

This is for a App.Config - but it should give some ide of what you are missing.

See the documentation for more details

Community
  • 1
  • 1
Jens Kloster
  • 11,099
  • 5
  • 40
  • 54