Oracle ManagedDataAccess驱动程序收到错误:ORA-03135:连接失去联系

时间:2016-07-19 19:26:44

标签: vb.net oracle

在打开与Oracle 11g和Oracle.ManagedDataAccess驱动程序(FileVersion 4.121.2.0)(VB.NET,Framework 4.0)的连接时出现以下错误:

Error Message : ORA-03135: Connection lost contact
Stack Trace :    at OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
   at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)
   at OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)
Inner Exception : OracleInternal.Network.NetworkException (0x80004005): ORA-03135: Connection lost contact ---> System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
   at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
   at OracleInternal.Network.ReaderStream.Read(OraBuf OB)
   at OracleInternal.TTC.OraBufReader.GetDataFromNetwork()
   at OracleInternal.TTC.OraBufReader.Read(Boolean bIgnoreData)
   at OracleInternal.TTC.MarshallingEngine.UnmarshalUB1(Boolean bIgnoreData)
   at OracleInternal.TTC.TTCProtocolNegotiation.ReadResponse()

web.config片段(如果需要,我可以提供更多详细信息):

 <configSections>
    <section name="oracle.manageddataaccess.client"
      type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
    </configSections>
  <oracle.manageddataaccess.client>
    <version number="*">
      <settings>
        <setting name="TNS_ADMIN" value="C:\oracle\product\11.2.0\client_1\network\admin"/>
        <setting name="NAMES.DIRECTORY_PATH" value="(TNSNAMES)"/>
        <setting name="SQLNET.ENCRYPTION_SERVER" value="rejected"/>
      </settings>
      <dataSources>
        <dataSource alias="SampleDataSource" descriptor="(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=ORCL))) "/>
      </dataSources>
    </version>
  </oracle.manageddataaccess.client>
  <runtime>
    <enforceFIPSPolicy enabled="false"/>
    <assemblyBinding appliesTo="v2.0.50727" xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
        <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
      </dependentAssembly>
      <dependentAssembly>
        <publisherPolicy apply="no"/>
        <assemblyIdentity name="Oracle.ManagedDataAccess" publicKeyToken="89b483f429c47342" culture="neutral"/>
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
  <system.data>
    <DbProviderFactories>
      <remove invariant="Oracle.ManagedDataAccess.Client"/>
      <add name="ODP.NET, Managed Driver" invariant="Oracle.ManagedDataAccess.Client" description="Oracle Data Provider for .NET, Managed Driver"
        type="Oracle.ManagedDataAccess.Client.OracleClientFactory, Oracle.ManagedDataAccess, Version=4.121.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
    </DbProviderFactories>
  </system.data>

具有相同设置的此应用程序在我的本地计算机上正常工作,并在服务器上失败。如果我更改对Oracle.DataAccess而不是Oracle.ManagedDataAccess的引用,则该应用程序在服务器上正常工作。

感谢你的时间。

此致 Javeed

0 个答案:

没有答案