.net Entity Framework mit Oracle 11g

Ich verwende Entity Framework mit dem Oracle-Anbieter (Oracle.ManagedDataAccessDTC)

Alles funktioniert einwandfrei mit Visual Studio, aber wenn ich das in IIS veröffentliche, erhalte ich eine Verbindungsfehlerausnahme.

Das ist meine Webkonfiguration, die in Visual Studio einwandfrei funktioniert:

<?xml version="1.0"?>
<configuration>

    <system.web>
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
  <connectionStrings>
    <add name="Entities" connectionString="metadata=res://*/Model.Model.csdl|
         res://*/Model.Model.ssdl|
         res://*/Model.Model.msl;
         provider=Oracle.ManagedDataAccess.Client;
         provider connection string='DATA SOURCE=ORCL;PASSWORD=giovanni;USER ID=DB_ES'" providerName="System.Data.EntityClient" />
  </connectionStrings>
</configuration>

Dies ist der Fehler, den ich auf IIS erhalte:

Server Error in '/EA' Application.

    ORA-12154: TNS:não foi possível resolver o identificador de conexão especificado

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

    Exception Details: OracleInternal.Network.NetworkException: ORA-12154 could not resolve the connect identifier specified

    Source Error: 


    Line 24:         public List<CADASTRO> GetCadastroBy(string CPF, string Cartao)
    Line 25:         {
    Line 26:             return ent.CADASTRO.Where(x => x.CPF.Equals(CPF) && x.NUMEROSEUCARTAO.Equals(Cartao)).Select(x => x).ToList<CADASTRO>();
    Line 27:         }

Abfragen von SQL Plus funktionieren einwandfrei.

irgendwelche Ideen Jungs?

LÖSUNG:

  <oracle.manageddataaccess.client>
    <version number="4.121.1.0">
      <settings>
        <setting name="TNS_ADMIN" value="C:\app\giovanni.saraiva\product\11.2.0\dbhome_2\network\admin"/>
      </settings>
    </version>
  </oracle.manageddataaccess.client>

auf webconfig.

Antworten auf die Frage(1)

Ihre Antwort auf die Frage