.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

ORA-12154: TNS:could not resolve the connect identifier specified

Posted By:      Posted Date: October 07, 2010    Points: 0   Category :ASP.Net

I have a fresh install of 10g ODAC that I have loaded. My Oracle client interface connects to the db just fine but when I attempt to connect with my ASP.NET project, I get the following error: ORA-12154: TNS:could not resolve the connect identifier specified

Can anyone help out on this?

View Complete Post

More Related Resource Links

ORA-12154: TNS:could not resolve the identifier specified

HiI have been trying to connect to Oracle from .net now for a working day and a bit.I have solved a number of errors and each time i do i get another one.The above error is where i am at nowhttp://ora-12154.ora-code.com/this link gives some pointers on how to avoid or solve it, i think all the suggestions are covered and it still occurs.could anyone shed any light please?thanks in advance 

TNS:could not resolve the connect identifier specified


Hi !

I am able to connect to Oracle 10g database server  through OLEDB and ODBC connection object . But I am unable  to connect to through OracleClient Object . Could any one can answer on this.

 Exception Inforamtion:

 An unhandled exception of type 'System.Data.OracleClient.OracleException' occurred in system.data.oracleclient.dll
Additional information: ORA-12154: TNS:could not resolve the connect identifier specified

Application Software:  ASP.NET & .Net  Framework 1.1 , Oracle 10g

 -Thank you

complex error :TNS:could not resolve the connect identifier specified


complex error with 12154: TNS:could not resolve the connect identifier specified

I searched to find any solution to solve this problem but I failed
I am trying to solve this problem to connect my XE database
I am using asp.net 2008
Error Description
If I build windows application the connection will be OK
if I test the connection throw server explorer the connection will be OK
but if I try to connect by website page the error will be TNS:could not resolve the connect identifier specified
TNSNAME file is OK because I connected already
main problem happened if I try to connect by running any website
notice : My laptop is 64 bit 

the connection string I am using (Provider=OraOLEDB.Oracle.1;Data Source=XE;Persist Security Info=True;User ID=hos)

provider : .NET Framework Data Provider for OLE DB


XE =

(SID = PLSExtProc)

InfoPath 2010 cannot connect to SharePoint 2010

You have installed Office 2010 beta and you are trying to connect to SharePoint 2010 from InfoPath but you get an error

could somebody give me example how I can connect to database only once if I use many models in contr


I use in my ASP.NET MVC application repository pattern and I use in controller for example 3 models:

   namespace MvcApplication1.Controllers  
        public class HomepageController : Controller  
            private IWebsitesRepository _repository_websites = new WebsitesRepository();  
            private IFirmRepository _repository_firm = new FirmRepository();  
            private IPhotosRepository _repository_photos = new PhotosRepository();  

In WebsiteRepozitory, FirmRepository and PhotosRepository classes I have:

Database1Entities _entities = new Database1Entities();

So I have 3 connections to database ? Is it wrong ? How can I solve it ?

SAAS: Connect Enterprise Apps with Hosted BizTalk Services


In this article we introduce you to BizTalk Services, new technology that offers the Enterprise Service Bus features of BizTalk Server as a hosted service.

Jon Flanders and Aaron Skonnard

MSDN Magazine June 2008

Interop: Connect To Mainframe Apps With BizTalk Adapters and .NET


If you have a significant investment in legacy COBOL applications running on mainframes, you need the BizTalk Adapters for Host Integration Server .

Bashar "Bash" Badawi

MSDN Magazine December 2007

ASP.Net connect to Oracle.


 We have an application which uses  'System.Data.OracleClient'. On the box it was developed we can change the TNSNAMES.ORA entries to connect to different oracle databases. Moving the code to a  Microsoft Server 2008 box it would appear that the application ignores the TNSNAMES.ORA file. It has cached the first Oracle connection and will now work without any TNSNAMES.ORA file. Where is it getting the connection? We have set tns_admin to point at the TNSNAMES.ORA file. We can tnsping the connection OK.

Facebook Connect


Does anybody have links to relevant articles on how Facebook Connect integrates with the Membership provider?

I'd like to make a .net site where you can login through the membership provider, or the Facebook Connect system.  But the big question is, how does your asp.net application know when the Facebook authentication has been successful.  Without manually entering a username and password, is there a function to authenticate users and draw the profile info from Facebook's data?

It seems like a good system, but the documentation is sparse.

unable to connect to database



I am using visual studio 2005 and sql server 2005.

I am developing a small quiz application and i have stored the connection string in app.config file which is given below.:

<?xml version="1.0" encoding="utf-8" ?>
        <add name="quizdb"
            connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|Quiz Application.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"
            providerName="System.Data.SqlClient" />
i have retrieved connection string property through configurationmanager class 

and when i m connecting to database  it gives me a runtime error:


Sql Exception was unhandled

System.Data.SqlClient.SqlException was unhandled
  Message="An attempt to attach an auto-named database for file F:\\Quiz\\Quiz\\bin\\Debug\\Quiz Application.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located

Connect to existing sql 2005 database


Hello There,

I had successfully restored sql 2000 database to sql 2005. It works like charm

Now i am creating a database model in MVC

I follow these steps

Right click on model > ADO.NET entity data model > Generate from database > New connection (Microsoft sql server) > server name > select or enter database name

But no server name AND database name show in both drop down lists. When i mannually enter database name (which exists in sql 2005) then click on TEST CONNECTION. It gives follwoing error

"A network-related or instance-specific error while establishing a connection to sql server. the server was not found or was not accessible. verify that the instance name is correct and that sql server is configured to allow remote connections.

Kindly help me with this


Basic ODBC Connection to connect to Crystal ???


I have visual studio 2008 professional with the inbuilt crystal reports version 10 I think.  I create everything from my laptop and IIS runs from my laptop as well.

I have created the most basic report to try and figure out a problem I have, anyways the report contains one database field that is it .... which I connect to by ODBC.  I then create a web form add the crystal report viewer to the report and the crystal report source run the web page and it loads the data from the field as I would expect to the crystal report viewer !!

I have several ODBC connections setup on my machine one using integrated security the other using SQL authentication both are system DSNs.  Now when I publish my application and access it from IIS and not the localhost I can access everything from my application ok except when I go to form that has the crystal reports I get this error (ODBC used here is the 'sa' account)

Logon failed. Details: IM002:[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified Error in File

If I use the other ODBC that uses Windows authentication I get this error message

Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database  requested by the login. T

Enter your credentials to connect to the web service


When trying to publish an InfoPath 2007 form template (as a Content Type), I am getting the following message with a UserName/Password dialog box:
Enter your credentials to connect to the following web service: http://MySitePath/_vti_bin/Webs.asmx

When I enter my credentials, the above dialog box appears again. I have carefully entered my credential. Another thing I noticed that despite this error I see the form got created at the destination library. The only thing is that the Content Type did not get created and hence is not available in the "Site Content Type Gallery".

We are using Sharepoint 2007 enterprise edition. And I have recently published the InfoPath form templates several time as Content type without any issue.


Please help. Thanks........

Cannot connect to the configuration database.



when i open my central administation i get this error:

Cannot connect to the configuration database


plz help?

Connect to MS Access via OLEDB provider


I am attempting to use the 64-bit OLEDB Provider for Access found in the "Microsoft Access Database Engine 2010 Redistributable" to connect to and query an Access 2003 database that is on another server separate from my SharePoint server. I have not had any success making the connection. My SharePoint server is Windows Server 2008 SP2 and I am running MOSS 2007 (patched up to the April 2010 CU)

Here is the connection info in my Application Definition XML:

    <LobSystemInstance Name="LessonsLearnedDevOLEDB_Instance">
        <Property Name="AuthenticationMode" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAuthenticationMode">RevertToSelf</Property>
        <Property Name="DatabaseAccessProvider" Type="Microsoft.Office.Server.ApplicationRegistry.SystemSpecific.Db.DbAccessProvider">OleDb</Property>
        <Property Name="rdbconnectionData Source" Type="System.String">\\server1\share1\Lessons.mdb</Property>
        <Property Name="rdbconnectionProvider" Type="System.String&qu

cannot connect to the configuration database


Hi All,

Recently I have migrated my SharePoint BackEnd (Database) Server to new hard drive. The reason of migration was to deploy and configure real time database replication by Symantec Veritas. After migration activity I was getting following error message

" cannot connect to the configuration database ".

But when I execute following steps, this errors message gone and everything got fine

1. Enable Named Pipe from SQL Server Configuration Manager > Protocols for MSSQLSERVER

2. Restart  SQL Server (MSSQLSERVER) service (Note: This service was already running and status was set to automatic ) and

3. Start SharePoint Configuration Wizard  

Now I need to know why every time I have to restart this service? When I turned on my sharepoint server machines in the moring I have to restart this service ( SQL Server (MSSQLSERVER) otherwise same error message appears (cannot connect to the configuration database). After restarting this service everything gets normal.

Any help in this regard will be greatly appreciated.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend