OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
Feneck91
Posts: 46
Joined: Mon 12 Aug 2013 13:52

OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Post by Feneck91 » Wed 11 Sep 2013 09:55

Hello Everybody.

I'm using dotConnect for oracle 7.9 + EF 6.0 RC1 / Code First.

I'm using a OracleConnection singleton instance to connect all provider to the database.
It's work fine.

Since I use new Entity Framework (6.0 Beta -> 6.0 RC1) and new dotConnect (oracle 7.8 -> oracle 7.9) I cannot connect to the database more than once.

When I see the instance of OracleConnection.ConnectionString after setting it, it contains the password to the database.
After EF migration is called (verify base strucutre and update if needed) that use this instance of DbConnection, the OracleConnection.ConnectionString is changed and the password is lost: next try to connect to the database indicate : ORA-01005: null password given; logon denied.

If I create the OracleConnection instance each time, it's work fine. What about the way to use the same OracleConnection instance to don't lost password on it ?

I don't know if this bug (is it really a bug) is from dotConnect side or Entity Framework side.

Any idea ?
Thank for your reply.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Post by MariiaI » Mon 16 Sep 2013 07:51

Thank you for the report. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

Feneck91
Posts: 46
Joined: Mon 12 Aug 2013 13:52

Re: OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Post by Feneck91 » Thu 24 Oct 2013 11:53

No issue for the moment ?

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Post by MariiaI » Fri 25 Oct 2013 11:08

Sorry for the delay.
After EF migration is called (verify base strucutre and update if needed) that use this instance of DbConnection, the OracleConnection.ConnectionString is changed and the password is lost: next try to connect to the database indicate : ORA-01005:
null password given; logon denied.
Most likely, you are setting the Persists Security Info parameter to False in the connection string. If yes, this behavior is expected due to the fact that when Persist Security Info is set to False, security information is discarded after it is used to open the connection, ensuring that an untrusted source does not have access to security-sensitive information.
Please try setting the Persists Security Info parameter to True (if your scenario allows it) or create the OracleConnection instance each time.
If it is not the case, please send us a sample project so that we are able to investigate it in more details.

Feneck91
Posts: 46
Joined: Mon 12 Aug 2013 13:52

Re: OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Post by Feneck91 » Fri 25 Oct 2013 11:34

OracleConnectionStringBuilder oraCSB = new OracleConnectionStringBuilder();
Just need to add : oraCSB.PersistSecurityInfo = true;

I think it's a new property because I was working without this line before.
Ok, now it's work well.

Thanks for your reply.

Post Reply