Problem Description:
Through C # Reference Oracle.ManagedDataAccess.dll access to Oracle, wrote the following code, in the function of normal access, but the compiled EXE placed on the server can not be accessed, has been prompted to log on failure.
PL/SQL on the server is able to access the database normally.
Static voidMain (string[] args) { stringConnstr=string. Empty; Try{connstr=string. Format (@"User id={3}; PASSWORD={4}; Data source= (description= (address_list = (address = (HOST = {0}) (PROTOCOL = TCP) (port= {1})) (Connect_data= (service_name ={2} ));","172.23.11.152","1521","ORCL","system","oracle123"); using(OracleConnection conn =NewOracleConnection (CONNSTR)) {OracleCommand Comm=NewOracleCommand ("Select COUNT (1) from Wifi.site_info", conn); Conn. Open (); ObjectA =Comm. ExecuteScalar (); Conn. Close (); Console.WriteLine (a); } } Catch(Exception ex) {Console.WriteLine (ex). ToString ()); Console.WriteLine ("Connection string:"+connstr); } console.read ();}View Code
Solve:
After looking for information in many ways, and finally in an English web site mentioned is the reason for FIPS encryption, as to how to solve, the online answer is mostly the FIPS closed. The closing method is as follows:
1. Enter regedit to open the system registration form
2. Locate the path HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa
3. View the Fipsalgorithmpolicy property on the right to change to 0
4. Locate the path hkey_local_machine\system\currentcontrolset\control\lsa\fipsalgorithmpolicy\
5. View the right-enabled modifier to 0.
C # cannot access Oralce through oracle.manageddataaccess