none
entity framework change existing db connection string RRS feed

  • Question

  • Hi, I have WPF application, and trying to modify the existing db connection string. but each time, when I update the data source name in the connection string, it gives me the error like the below, I have to manually do the remapping, I believe the db name and password are correct.

    The second strange thing is that I use local db as my connection and it works fine, but I place the application in another machine running locally, it gives me the same error like the below. I keep the db name and password the same I believe.

     <add name="CourtFLOWEntities" connectionString="metadata=res://*/TransDef.csdl|res://*/TransDef.ssdl|res://*/TransDef.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=.;initial catalog=CourtFLOW;persist security info=True;user id=ADMIN;password=test123;multipleactiveresultsets=True;application name=EntityFramework&quot;" providerName="System.Data.EntityClient" />


    "

    An exception of type 'System.Data.Entity.Core.EntityException' occurred in EntityFramework.SqlServer.dll but was not handled in user code

    Additional information: The underlying provider failed on Open.

    "

    Friday, February 24, 2017 1:52 PM

Answers

  • Additional information: The underlying provider failed on Open.

    Need to do a Stack Trace to get the inner exception message to find the real error.

    • Marked as answer by sdnd2000 Friday, February 24, 2017 4:20 PM
    Friday, February 24, 2017 3:13 PM