Connection problems between the Entity Framework and the Database?

Asked

Viewed 88 times

0

While running my application I am encountering the following error when loading the data through the Entity Framework.

When it is executed I observe that the following is called connection string:

inserir a descrição da imagem aqui

In it I note that a different user and password is being loaded than what I inform on Web.config (which are the ones that effectively work for connection to the bank).

Below the correct connection:

data source=desenv-srvsql\sqlclust01;initial catalog=dbBANPARA_SGDTV;user id=ntconsult;password=12345;MultipleActiveResultSets=True;App=EntityFramework""providerName="System.Data.EntityClient"

I have already reviewed all my classes and I have not found where the information passed in the first image is being taken. I would like help on the issue and if possible manage to pass the correct information to the application.

1 answer

0

Check that there are no two connection strings in your web.config file and check in the context creation class if you are using the correct Connection string.

  • I’ve looked at the web.config and it’s all right. Where would this context creation class be?

  • @Rodneyvictor look for a class he inherits from Dbcontext. I don’t know how your application is configured, but you may not have created a context class. Good luck.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.