Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: TNS could not resolve the connect identifier
Charles Hooper wrote:
> antonyliu2002_at_yahoo.com wrote:
> > I've searched this group before I decided to post this question,
> > fearing being humiliated again by the notorious super Oracle DBA from
> > the Netherlands whose last name is Bakker. Mr. Bakker, please stop
> > right here immediately.
> >
> > I am not a database person, I do web development with ASP.NET 2.0 for
> > IIS.
> >
> > 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, I
> > successfully 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 web sever on Machine
> > B, I get the following error:
> >
> > <error>
> > System.Data.OleDb.OleDbException: ORA-12154: TNS:could not resolve the
> > connect identifier specified.
> > </error>
> >
> > And the following the portion for connectionString in web.config for
> > this web application:
> >
> > <connectionStrings>
> > <add name="MyOracleConnectionString"
> > connectionString="Provider=MSDAORA.1;Data Source=MyDataSource;Persist
> > Security Info=True;Password=MyPassword;User ID=MyUserID"
> > providerName="System.Data.OleDb" />
> > </connectionStrings>
> >
> > I can tnsping mydatabase with no problem on both the development
> > machine (Machine C) and the productive web server (Machine B). So, I
> > guess this issue is probably not related to the TNSNAME setting.
> >
> > Is it because the same database provider is not installed on the
> > productive web server (Machine B)? Would you kindly share your wisdom
> > please? Thanks.
>
>
>
>> & ";Password=" & session("Password") & ";Data
> dbConnect.Open "Provider=MSDAORA.1;User ID=" & session("Username")
>
>
Thx, Charles, per your suggestion, I just downloaded MDAC 2.8 from M$ and installed, I even installed ODBC_NET.msi from M$ as well. Neither helped.
As I mentioned in my reply to hpuxrac, classic ASP pages on the same production server can get data from the database just fine.
I restarted IIS, and it did not help. Received on Wed Nov 22 2006 - 22:05:52 CST