Using Visual Studio 2008 on Vista 64 bit, if I create a test web site or web application that looks like this...
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
OracleConnection connection;
connection = new OracleConnection("User Id=user;Password=userpass;Data Source=dataSource;");
connection.Open();
}
}
...and run it, I get the following error.
ORA-12154: TNS:could not resolve the connect identifier specified
I'm aware of this issue regarding parens... http://duanesbrain.blogspot.com/2007/01/ora-12154-using-c-with-microsoft-visual.html
Visual Studio 2008 is installed in Program Files (x86) but another dev has that same setup and it works fine for him. The project itself is not within a directory with a name that has parens.
I know it's not my tnsnames.ora or my sqlnet.ora files. I have my machine set up the exact same way as all the devs who've been working on this project for a lot longer than I.
I am also 100% certain the connection string I am using is correct.
If I create a console application with the same exact code, it connects fine. I can ping the oracle server and connect directly through command prompt using that connection string info also.
Another odd thing is that if I create a web application or web site with the same code using VS 2005 (also installed in Program Files (x86)) it works fine as well.
It seems to be restricted to web applications and sites only using VS 2008.
EDIT: I should add that my oracle folder has all permissions given to everyone currently.
EDIT: Oracle version is 10.2.0
EDIT: Thanks for the insights, I never could get it to work and the other devs and I decided it would be faster to build an XP vm to work on. In a few hours I had one set up and everything runs fine.