I created webapp on one server to query an oracle database housed on another server
It works from within visual studio,”view in browser” but when the page is server from IIS the following is displayed
System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified
Any help is much appreciated; 
full details of the setup are below, is this a permissions issue.
I have read many many posts and believe that I have everything configured correctly ?
SERVERone:
Windows 2003 server running IIS 6.0 with .NET framework 2.057 and oracle InstantClient.
Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210
I have a tnsname.ora and sqlnet.ora saved to the same directory (C:\instantClient\instantclient10_1)
I have a corresponding enviroment variable to that folder TNS_ADMIN C:\instantClient\instantclient10_1
“Authenticated Users” has FULL CONTROL permissions on this folder and subfolders
Permission for read execute are also set for IWAM_SERVERone , IUSR_SERVERone, SERVERtwo/ASPNET
SERVEtwo:
Windows 2003 sever which is running an instance of Oracle 9i database.in
ORA home folder “Authenticated Users” has FULL CONTROL permissions and sub folders
Permission for read execute are also set for IWAM_SERVERone, IUSR_SDMS-SERVERone, SERVERtwo ASPNET
I can successfully connect from SERVERone to SERVERtwo using TOAD 9.0.1 and I can query the database.
More Details.....
I want to create a web app on SERVERone to queryan oracle database on SERVERtow
I created an ASP.NET application using visual web developer.
I addded a sqldatasource and configured the sqldatasource to use “oracle database” as the data source, and the data provider “.NET Framework Data Provider for Oracle”
I set the Server Name to the entry from the Tnanames.ora file an dentered the username and password
When I click TEST CONNECTION it works , I then added a select * from xyz query
WHEN I RUN THE PAGE FROM WITHIN VWD it works perfectly ( “view in browser”)
However when I add the site to IIS and launch the page I get the ORA-12154 error
TNSNAME.ORA entry
HOMER=
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(HOST = 182.198.100.14)
(PORT = 1521)
)
)
(CONNECT_DATA =
(SID = ERR)
(GLOBAL_NAME = ERR.world)
)
)
sqlnet.ora ( this is the only line in this file , I also tried NTFS to no avail)
SQLNET.AUTHENTICATION_SERVICES= (NONE)
DATA SOURCE
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand='SELECT * FROM XYZ'>
<SelectParameters>
WEB CONFIG Entry
<
ORA-12154: TNS:could not resolve the connect identifier specified
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OracleClient.OracleException: ORA-12154: TNS:could not resolve the connect identifier specified
Source Error:
|
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
|
Stack Trace:
[OracleException (0x80131938): ORA-12154: TNS:could not resolve the connect identifier specified ] System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) +84 System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +688 System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +135 System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +37 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +512 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +102 System.Data.OracleClient.OracleConnection.Open() +34 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137 System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83 System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.GridView.DataBind() +4 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69 System.Web.UI.Control.EnsureChildControls() +87 System.Web.UI.Control.PreRenderRecursiveInternal() +41 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Control.PreRenderRecursiveInternal() +161 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360 |
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210