C # cannot access Oralce through oracle.manageddataaccess

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.