I recently got a new machine at work, and moved from XP 32 Bits to Vista 64 Bits.
Whatever I do I cannot get my .Net projects to connect to the oracle Server… I can connect to the database using oracle sqldeveloper, but not from my projects…
I Get This error (which is puzzling me…)
‘An error has occurred while establishing a connection to the server. When connecting to SQL Server, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL Network Interfaces, error: 26 – Error Locating Server/Instance Specified)’
My first WTF was the ‘SQL Server’ part as my entire project remains unchanged and I don’t use SQL Server at all (in this project)…
My connection string is as follows:
<add name='DefaultDb' providerName='System.Data.OracleClient' connectionString='Data Source=ora11dev;User Id=user;Password=pass;Integrated Security=no;'/>
I have re-installed the oracle client and oracle connection tools for .net but my problem persists….
Can any one point out something I might be missing?
EDIT:
When I open my connection I get this error: ORA-12154: TNS:could not resolve the connect identifier specified
And i have my tnsnames.ora correct…
Try setting the environment variable TNS_ADMIN to point to the directory where your tnsnames.ora file resides. This will tell you if you’ve got an issue with your client locating the proper Ora Networking files.
Edit: What is the path name to visual studio? Are there parens in it, e.g., ‘C:\Program Files (x86)\Microsoft Visual Studio\’? If so, there is a known bug that is exposed with this scenario. The fixes are to install a patch, or to reinstall Visual Studio in a location that does not have parens in the path.