I am trying to host the Web API that was published in the DEV server in to the TEST server.I used the published method as File System in DEV and copied those folder in to Test server and tried to create the new Website in the IIS. So in the IIS, I see the connection string
<connectionStrings><add name="ProDataConnection" connectionString="Data Source=ABC;User Id=ABCD;Password=ABCDE;pooling=true;min pool size=5;Max Pool Size=60" providerName="Oracle.DataAccess.Client" /></connectionStrings>
Also I did check the tnsnames.ora has the connection details.I did create the Environment Variable TNS_ADMIN as
But when I test the API in the Fiddler it gives me
{"Message":"An error has occurred.","ExceptionMessage":"The 'ObjectContent1' type failed to serialize the response body for content type 'application/json; charset=utf-8'.","ExceptionType":"System.InvalidOperationException","StackTrace":null,"InnerException":{"Message":"An error has occurred.","ExceptionMessage":"ORA-12154: TNS:could not resolve the connect identifier specified","ExceptionType":"Oracle.ManagedDataAccess.Client.OracleException","StackTrace":" at OracleInternal.ConnectionPool.PoolManager 3.Get(ConnectionString csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)\r\n at OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString csWithNewPassword, Boolean bGetForApp, String affinityInstanceName, Boolean bForceMatch)\r\n at OracleInternal.ConnectionPool.OracleConnectionDispenser 3.Get(ConnectionString cs, PM conPM, ConnectionString pmCS, SecureString securedPassword, SecureString securedProxyPassword)\r\n at Oracle.ManagedDataAccess.Client.OracleConnection.Open()\r\n at ProvantisStudyData.Controllers.OracleDataTableJsonResponseConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)\r\n at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)\r\n at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)\r\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)\r\n at System.Net.Http.Formatting.JsonMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, Encoding effectiveEncoding)\r\n at System.Net.Http.Formatting.BaseJsonMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.WebHost.HttpControllerHandler.d__1b.MoveNext()","InnerException":{"Message":"An error has occurred.","ExceptionMessage":"ORA-12154: TNS:could not resolve the connect identifier specified","ExceptionType":"OracleInternal.Network.NetworkException","StackTrace":" at OracleInternal.Network.AddressResolution..ctor(String TNSAlias, String instanceName)\r\n at OracleInternal.Network.OracleCommunication.DoConnect(String tnsDescriptor)\r\n at OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString cs, Boolean bOpenEndUserSession, String instanceName)"}}}