I have created a web application in .net and the connected database is oracle. it's working properly in the localhost but whin i publish it in to an IIS server, sometimes it's working fine but sometimes it's not. it says that ORA-12545: Connect failed because target host or object does not exist. Tns also perfect.
Server Error in '/' Application.
ORA-12545: Connect failed because target host or object does not exist
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-12545: Connect failed because target host or object does not exist
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-12545: Connect failed because target host or object does not exist
]
System.Data.OracleClient.OracleException.Check(OciErrorHandle errorHandle, Int32 rc) +340556
System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName) +881
System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions) +129
System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject) +40
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +31
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +548
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +69
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +470
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +108
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +118
System.Data.OracleClient.OracleConnection.Open() +43
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(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) +160
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) +108
WebApplication1.OracleDatasetTableAdapters.CITY_POSTAL_CODESTableAdapter.GetData() in F:\Achchu\TSR_GEOTrackingSystem\OracleDataset.Designer.cs:9666
WebApplication1.Site1.SetManu() in F:\Achchu\TSR_GEOTrackingSystem\Site1.Master.cs:140
WebApplication1.Site1.Page_Load(Object sender, EventArgs e) in F:\Achchu\TSR_GEOTrackingSystem\Site1.Master.cs:38
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
System.Web.UI.Control.OnLoad(EventArgs e) +92
System.Web.UI.Control.LoadRecursive() +54
System.Web.UI.Control.LoadRecursive() +145
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +772
User contributions licensed under CC BY-SA 3.0