Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Oracle.ManagedDataAccess.Core Issue with .Net

tux2003Jan 18 2019 — edited Jan 21 2019

Hi:

I’m trying to connect to Oracle9i Enterprise Edition Release 9.2.0.8.0 with Visual Studio Community 2017 and C# .NETFramework 4.7.2 running over Windows 10 x64

I downloaded to my solution the dll’s required to this with the command PM> Install-Package Oracle.ManagedDataAccess.Core -Version 2.18.3 (I got this from Oracle site and a video the same place)

The code that I wrote is:

        using System.Data;

        using Oracle.ManagedDataAccess.Client;

        using Oracle.ManagedDataAccess.Types;

        private void button1_Click(object sender, EventArgs e)

        {

            try

            {

                string lsCnn = "User Id=my_user;Password=\"Pwd_AUKIL_HTAdxc2019\";Data Source=10.1.34.18:1521/TEST1;Persist Security Info=False;";

                using (OracleConnection loCnn = new OracleConnection(lsCnn))

                {

                    loCnn.Open();

                    using (OracleCommand loCmd = loCnn.CreateCommand())

                    {

                        loCmd.CommandText = "SELECT 'test' FROM DUAL";

                        OracleDataReader loReader = loCmd.ExecuteReader();

                        while (loReader.Read())

                        {

                            System.Diagnostics.Debug.Write("{0}", loReader.GetString(0));

                        }

                    }

                    loCnn.Close();

                }

            }

            catch (Exception ex)

            {

                System.Diagnostics.Debug.WriteLine(ex.Message);

            }

        }

But it doesn’t work!!! I got the next message: ORA-01017: invalid username/password; logon denied

The credentials (userid & Pwd), ip Address and Port are OK, I'm using the same info in sqldeveloper and is running without any problem. Can your help me with that??

I tried too adding to App.config the next lines:

  <runtime>

    <enforceFIPSPolicy enabled="false"/>

  </runtime>

But the error still, I reviewed this key over Regedit and the value is Off

Thanks in advance for your support, Regards.

NombreValorTipo
$exception{"ORA-01017: invalid username/password; logon denied"}Oracle.ManagedDataAccess.Client.OracleException
Comments
Post Details
Added on Jan 18 2019
6 comments
3,935 views