I just ran into this error when trying to: ORA-12154: TNS:could not resolve service name on one of our development machines. We were using Crystal Designer, installed on the server directly and could not Log On to the server inside the designer. In ASP.NET we were getting
Message: Database logon failed. Stack Trace:
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)
One confusing part was that other tools (e.g. PL SQL Developer, using a file called test.UDL and testing that) connected to the new and old instances fine and CR designer connected to older instances fine (but not the new instance).
Knowing that TNSNAMES.ORA contains references to these instances, we thought we had all TNSNAMES.ORA's correctly updated with the entry to the new instance, but alas, there were 4 TNSNAMES.ora files on this server and 2 were out of sync. Yeah, why do we have 4? Unsure, this is a dev box and things just get "weird"... so bottom line: do a search of the entire disk and make sure ALL of your TNSNAMES.ora files have the entry you are trying to connect to.