Error Entity Framework WPF Client

Asked

Viewed 90 times

0

I installed my application in client environment but am getting the following error:

Nome do Evento de Problema: CLR20r3
  Assinatura do Problema 01:    eLogBook.exe
  Assinatura do Problema 02:    1.0.0.0
  Assinatura do Problema 03:    5a7e2d47
  Assinatura do Problema 04:    EntityFramework
  Assinatura do Problema 05:    6.2.61023.0
  Assinatura do Problema 06:    59ee4ce1
  Assinatura do Problema 07:    57cc
  Assinatura do Problema 08:    6c
  Assinatura do Problema 09:    System.InvalidOperationException
  Versão do sistema operacional:    6.1.7601.2.1.0.768.3
  Identificação da Localidade:  1046
  Informações Adicionais 1: 0a9e
  Informações Adicionais 2: 0a9e372d3b4ad19135b953a78882e789
  Informações Adicionais 3: 0a9e
  Informações Adicionais 4: 0a9e372d3b4ad19135b953a78882e789

Just that I put all the necessary dll and that are in my application’s Debug folder.

inserir a descrição da imagem aqui

What could that be? I am using two databases: Mysql and SQLCE, both using EF6

I installed SQLCE 4.0 SP1 in the client machine, but the error continues.

UPDATE 1: I got the following error with a log:

    System.InvalidOperationException: No connection string named 'remoteEntities' could be found in the application config file.
   em System.Data.Entity.Internal.LazyInternalConnection.get_ConnectionHasModel()
   em System.Data.Entity.Internal.LazyInternalContext.InitializeContext()
   em System.Data.Entity.Internal.InternalContext.Initialize()
   em System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
   em System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
   em System.Data.Entity.Internal.Linq.InternalSet`1.get_InternalContext()
   em System.Data.Entity.Infrastructure.DbQuery`1.System.Linq.IQueryable.get_Provider()
   em System.Linq.Queryable.Select[TSource,TResult](IQueryable`1 source, Expression`1 selector)
   em View.MainController.validaStatus(String usuario)

UPDATE 2:

public bool validaStatus(string usuario)
    {
        try
        {
            var resultado = remote.Motorista.Select(x => new { x.ID, x.Login, x.Status })
            .Where(u => u.Login == usuario && u.Status == 1).ToList();
            if (resultado.Count > 0)
                return true;
            else
                return false;
        }
        catch (Exception e)
        {
            loc.LOGTexto("", e.ToString());
            return false;
        }
    }
  • in debug, what’s the error? you implemented some log to capture exceptions?

  • No debug error, only in client.

  • The problem is in View.MainController.validaStatus(String usuario), in an excerpt that seeks Linq. Probably a Select(). We need the code of this method validaStatus(string) to better understand.

  • The error says that you do not have the app.config file with a 'remoteEntities' name string Connection... certainly used within its remote context ...

1 answer

-1

From the photo you posted, it seems to be missing the eLogBook.exe.config file in the folder where you published your application.

The error that is occurring is because the application does not recognize its connection string that gets stored in that configuration file, just because the file does not exist.

  • 1

    This does not answer the question. When you have reputation enough, you’ll be able to leave comments on any post but until then, write only answer that no depend on more information of who asked. - Of Revision

  • @hugocsl understand that my answer really was incomplete and so I edited, I believe that now it has become clearer and it is possible to see that in fact it did not depend on more information from the person who asked the question. Thanks for the help.

Browser other questions tagged

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