locked
problem: connection with EDM RRS feed

  • Question

  • Hi, i'm developping a wpf application and i use an EDM to generate DATABASE,

    i have the EDM in a separate class library, and i have added a refernce to my main project and i have added also an  app.config in may main project wich contain the connetionstring their. but I am getting the following error when attempting to connect to the EDM:

    "The specified named connection is either not found in the configuration, not intended to be used with the EntityClient Provider, not valid."

    Tuesday, May 15, 2012 3:22 PM

Answers

  • Hi DevDOTNETns,

    Welcome to MSDN Forum.

    Please don't only copy the connection string to the main project's app.config file, copy the entire app.config file to your main project to replace the exist app.config file.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 17, 2012 2:35 AM

All replies

  • Hi,

    Humm... either the connection string is not found or valid ? ;-) How does it look like ? You just copied/pasted from the exact connection string that were stored at design time and it is also named as it should ?


    Please always mark whatever response solved your issue so that the thread is properly marked as "Answered".

    Tuesday, May 15, 2012 5:09 PM
  • configuration>
      <connectionStrings>
        <add name="EDMContainer" connectionString="metadata=res://*/EDM.csdl|res://*/EDM.ssdl|res://*/EDM.msl;provider=System.Data.SqlClient;provider connection string=&quot;Data Source=TOSHIBA-PC;Initial Catalog=Mydatabase;Integrated Security=True;MultipleActiveResultSets=True&quot;" providerName="System.Data.EntityClient" />
      </connectionStrings>
    </configuration

    Tuesday, May 15, 2012 6:37 PM
  • Hi DevDOTNETns,

    Welcome to MSDN Forum.

    Please don't only copy the connection string to the main project's app.config file, copy the entire app.config file to your main project to replace the exist app.config file.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, May 17, 2012 2:35 AM
  • Hi DevDOTNETns,

    Have you solved the issue? I look forward to hearing from you.

    Best Regards


    Allen Li [MSFT]
    MSDN Community Support | Feedback to us

    Monday, May 21, 2012 3:10 AM
  • thank you
    Monday, May 21, 2012 9:01 AM