Page 1 of 1

OracleConnection lost password since using dotConnect 7.9 + EF 6 RC1

Posted: Wed 11 Sep 2013 09:55
by Feneck91
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.

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

Posted: Mon 16 Sep 2013 07:51
by MariiaI
Thank you for the report. We have reproduced this issue. We will investigate it and inform you about the results as soon as possible.

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

Posted: Thu 24 Oct 2013 11:53
by Feneck91
No issue for the moment ?

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

Posted: Fri 25 Oct 2013 11:08
by MariiaI
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.

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

Posted: Fri 25 Oct 2013 11:34
by Feneck91
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.