I posted this question yesterday in the oracle group. I thought over
this issue, and I think people here may have come across similar
problems.
I am working on a ASP.NET 2.0 web application for IIS 6.0, the backend
database for my web application is Oracle 10.1.0.2.0.
This database resides on Machine A.
The Web server is running on Machine B.
I am developing the web application on Machine C.
>From within Visual Web Developer 2005 Express on Machine C, Isuccessfully configured the database connection. So, from the
development machine, the web application works great, and the ListBox
gets populated with data from the Oracle database nicely.
But, if I check out this web application from the production web sever
on Machine B, I get the following error:
<error>
System.Data.Ole Db.OleDbExcepti on: ORA-12154: TNS:could not resolve the
connect identifier specified.
</error>
And the following is the portion for connectionStrin g in web.config for
this web application:
<connectionStri ngs>
<add name="MyOracleC onnectionString "
connectionStrin g="Provider=MSD AORA.1;Data
Source=MyDataSo urce;Persist
Security Info=True;Passw ord=MyPassword; User ID=MyUserID"
providerName="S ystem.Data.OleD b" />
</connectionStrin gs>
>From which, it looks like the database provider is MSDAORA. Both thedevelopment machine and the production web server have msdaora.dll
under Program Files\Common Files\System\.
Other Classic ASP and ASP.net applications on the same web server can
connect to the same database with no problem at all using ODBC. But I
cannot successfully configure this current ASP.NET 2.0 application to
use ODBC.
Anyone can share a little light on this mystery? Thanks.