c# - ODP.NET Oracle.ManagedDataAccess causes ORA-12537 network session end of file -


overview

i want replace oracle.dataaccess orcale.manageddataaccess, opening connection latter throws ora-12537 network session end of file exception.

exception message / stack trace

{oracleinternal.network.networkexception (0x000030f9): ora-12537: netzwerksession: dateiende @ oracleinternal.network.readerstream.read(orabuf ob) @ oracleinternal.ttc.orabufreader.getdatafromnetwork() @ oracleinternal.ttc.orabufreader.read(boolean bignoredata) @ oracleinternal.ttc.marshallingengine.unmarshalub1(boolean bignoredata) @ oracleinternal.ttc.ttcprotocolnegotiation.readresponse()}

i trying connect oracle 11g database , not have client installed on local machine.

working test application (unmanaged)

using oracle.dataaccess works fine.

using system; using oracle.dataaccess.client;  namespace app.odp.unmanaged {     internal class program     {         private static void main(string[] args)         {             //dummy connection string. using sid              string connectionstring = "user id=***;password=***;data source=1.2.3.4:1521/sid01;";              try             {                 using (var conn = new oracleconnection(connectionstring))                 {                     conn.open();                     using (oraclecommand cmd = conn.createcommand())                     {                         cmd.commandtext = "select * all_users";                          using (oracledatareader reader =     cmd.executereader())                         {                                                         console.writeline("visiblefieldcount: {0}", reader.visiblefieldcount);                             console.writeline("hiddenfieldcount: {0}", reader.hiddenfieldcount);                         }                     }                 }             }             catch (exception ex)             {                 console.writeline("error:{0}", ex.message);             }              console.readline();         }     } } 

references , dependencies

  • oracle.dataaccess (2.111.7.0)
  • oci.dll (11.1.0.1)
  • orannzsbb11.dll (11.1.0.6)
  • oraociei11.dll (oracle call interface instant client)
  • oraops11w.dll (2.111.7.0)

project settings

plattform target x86
target framework 4.5

failing test application (managed)

using nuget package official oracle odp.net, managed driver 12.1.21

code identical above. change:

using system; using oracle.manageddataaccess.client; //... rest same above 

references , dependencies

only:

  • oracle.manageddataaccess (4.121.2.0)

project settings

plattform target any cpu
target framework 4.5

app.config

<?xml version="1.0" encoding="utf-8"?> <configuration>   <configsections>     <section name="oracle.manageddataaccess.client" type="oracleinternal.common.odpmsectionhandler, oracle.manageddataaccess, version=4.121.2.0, culture=neutral, publickeytoken=89b483f429c47342" />   </configsections>   <startup>     <supportedruntime version="v4.0" sku=".netframework,version=v4.5" />   </startup>   <system.data>     <dbproviderfactories>       <remove invariant="oracle.manageddataaccess.client" />       <add name="odp.net, managed driver" invariant="oracle.manageddataaccess.client" description="oracle data provider .net, managed driver" type="oracle.manageddataaccess.client.oracleclientfactory, oracle.manageddataaccess, version=4.121.2.0, culture=neutral, publickeytoken=89b483f429c47342" />     </dbproviderfactories>   </system.data>   <runtime>     <assemblybinding xmlns="urn:schemas-microsoft-com:asm.v1">       <dependentassembly>         <publisherpolicy apply="no" />         <assemblyidentity name="oracle.manageddataaccess" publickeytoken="89b483f429c47342" culture="neutral" />         <bindingredirect oldversion="4.121.0.0 - 4.65535.65535.65535" newversion="4.121.2.0" />       </dependentassembly>     </assemblybinding>   </runtime>   <oracle.manageddataaccess.client>     <version number="*">       <datasources>         <!--<datasource alias="mydatasource" descriptor="(description=(address=(protocol=tcp)(host=1.2.3.4)(port=1521))(connect_data=(sid=sid01)))" />-->       </datasources>       <settings>         <!--<setting name="sqlnet.authentication_services" value="nts"/>-->       </settings>     </version>   </oracle.manageddataaccess.client> </configuration> 

i have tried different settings (nts, none, all) , changed connection string user id=xxx;password=xxx;data source=mydatasource;, error stays same.

questions

  • what causing ora-12537 network session end of file exception?
  • is reference / dependency missing?
  • does have configured on db server?

update

on server getting ora-12679: native services disabled other process required error in alert.log.

it seems have encryption. commenting out following lines in servers sqlnet.ora solves issue.

#sqlnet.authentication_services=(nts) #sqlnet.encryption_types_server = (rc4_128, rc4_256) #sqlnet.encryption_server=required #encryption_wallet_location= #          (source=(method=file)(method_data= #                  (directory=...\%oracle_sid%\wallet))) 

new question

how configure manageddataaccess works encryption?

update 2

seems work odp managed driver 12c:
https://www.nuget.org/packages/oracle.manageddataaccess/

edit: aso supported. upgrade odac 12c release 4 or later. if not fix problem, check alert.log on database server , investigate (google) errors occur there when attempt connect.


original answer:

as of writing (4/30/15) there no support oracle advanced security option (aso) encryption odp.net managed driver causing errors.

this supported @ point in future if reading @ later date, check latest odp.net docs see if upgrade of odp.net needed.

http://docs.oracle.com/cd/e56485_01/win.121/e55744/installconfig.htm#chdjidig


Popular posts from this blog

matlab - Compression and Decompression of ECG Signal using HUFFMAN ALGORITHM -

utf 8 - split utf-8 string into bytes in python -