2
I am trying to run a project on my computer but it accuses error in string:
Oracleconnection.Connectionstring is invalid
The same project works normally on the computer where it was started. The version of oracle on both computers is 11g. I removed all oracle from my machine and reinstalled, as well as ODAC 4.
The same string I am using in Webconfig is in oracle Tnsnames and I connect with the base normally.
I made the connection with the same base in visual studio using Oracle OLE DB, connection also worked.
I have another application that connects to the same bank and works, the only difference is that this other application does not have Membership. My Connection String in Webconfig:
<connectionStrings>
<remove name="LocalSqlServer" />
<add name="Oracle" providerName="Oracle.DataAccess.Client" connectionString="User ID=User;Password=MinhaSenha;Persist Security Info=True;Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.200)(PORT = 1570)))(CONNECT_DATA = (SERVICE_NAME = MyServiceName.Exemplo.com)));Connection Timeout=14400;Max Pool Size=900;" />
</connectionStrings>
Some attempts already made:
- In ASP.Net Configuration, in providers, I enabled the Oraclemembershipprovider option for both Membership Provider and Role Provider.
- In ASP.Net Configuration, in security, I cannot make changes due to error "Oracleconnection.Connectionstring is invalid".
- I commented on the line where it points the error, but whenever the comic is called the same error occurs on another line with Membership.
- I redid the reference for Oracle.Dataclient with Solution rebuild.
Apparently the configurations of the two machines are the same: VS2012 and Oracle 11g with ODDAC version 4.112.3.0.
I came to suspect something of Warning below, but searching the web I found nothing related:
There was a Mismatch between the Processor Architecture of the project being built "MSIL" and the Processor Architecture of the Reference "Oracle.Dataaccess, Version=4.112.3.0, Culture=neutral, Publickeytoken=89b483f429c47342, processorArchitecture=x86", "x86". This Mismatch may cause Runtime failures. Please consider Changing the Targeted Processor Architecture of your project through the Configuration Manager so as to align the Processor Architectures between your project and References, or take a dependency on Ferences with a Processor Architecture that Matches the Targeted Processor Architecture of your project.
Has anyone been through anything like this and could you help solve this problem? Some colleagues said that it’s boring to run Membership on the oracle, really of so much trouble?
I’m already reading about the differences, I’ll change in the project and see if you solve the case and mark as response. Thank you!
– George Wurthmann
@Georgewurthmann good luck!
– OnoSendai
I found the error in my web config, but preferred to use your solution due to its advantages. The error in my web.config was in roleManager. He needed to add the child <Provider> element. Following link for more information: https://msdn.microsoft.com/pt-br/library/ms164660(v=vs.100). aspx
– George Wurthmann
@Georgewurthmann Ah, I confess it did not occur to me to check the presence of
<provider>
. Anyway I’m glad you found a suitable solution!– OnoSendai