Erro ao recuperar dados do Banco de Dados
Pessoal, estou com um problema em um servico wcf, quando tento recuperar dados do meu database, o erro é o seguinte;
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
o detelhe é que eu consigo efetuar qualquer outra operação, ou seja, Inserção, deleção e alteração, a unica coisa que não consigo é a consulta propriamente dita, achei que o erro seria por causa do Entity framework Code first montei toda minha estrutura em um edmx, mesmo assim continua dando erro, alguem tem uma luz??????
Failed to invoke the service. Possible causes: The service is offline or inaccessible; the client-side configuration does not match the proxy; the existing proxy is invalid. Refer to the stack trace for more detail. You can try to recover by starting a new proxy, restoring to default configuration, or refreshing the service.
o detelhe é que eu consigo efetuar qualquer outra operação, ou seja, Inserção, deleção e alteração, a unica coisa que não consigo é a consulta propriamente dita, achei que o erro seria por causa do Entity framework Code first montei toda minha estrutura em um edmx, mesmo assim continua dando erro, alguem tem uma luz??????
Alberto Amorim
Curtidas 0
Respostas
Alberto Amorim
17/10/2012
Resolvido, o entity por padrão está configurado para gerar um proxy automaticamente, a solução então é desativar essa opção com o o comando abaixo:
DbContext.Configuration.ProxyCreationEnabled = false;
DbContext.Configuration.ProxyCreationEnabled = false;
GOSTEI 0
Joel Rodrigues
17/10/2012
Tópico encerrado.
Abraço.
Abraço.
GOSTEI 0