I want to connect with distributed database which is on two virtualbox machines with Oracle Linux using entity framework and wcf. Names of machines Oracle DB Developer VM_2 and Oracle DB Developer VM_1. I use NAT with NetworkCIDR=10.0.2.0/24 and Host-only network adapter 192.168.56.1/24 . There are two connections
On first machine
enp0s8:
ipv4 adress: 10.0.2.5
default route:10.0.2.1
dns 192.168.0.1
enp0s03:
ipv4 adress: 192.168.56.1
on the second machine
enp0s8:
ipv4 adress: 10.0.2.4
default route:10.0.2.1
dns 192.168.0.1
enp0s03:
ipv4 adress: 192.168.56.102
Does anyone knows how to do it? Please help.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<appSettings>
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
</appSettings>
<system.web>
<compilation debug="true" targetFramework="4.5">
<assemblies>
<add assembly="System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</assemblies>
</compilation>
<httpRuntime targetFramework="4.5" />
</system.web>
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information, set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<!-- To receive exception details in faults for debugging purposes, set the value below to true. Set to false before deployment to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<protocolMapping>
<add binding="basicHttpsBinding" scheme="https" />
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true" />
<!--
To browse web app root directory during debugging, set the value below to true.
Set to false before deployment to avoid disclosing web app folder information.
-->
<directoryBrowse enabled="true" />
</system.webServer>
<connectionStrings>
<add name="Entities1" connectionString="metadata=res://*/Model1.csdl|res://*/Model1.ssdl|res://*/Model1.msl;provider=Oracle.ManagedDataAccess.Client;provider connection string="data source=Environment.MachineName:1521/; providerName="System.Data.EntityClient" />
-->
</connectionStrings>
<entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
</entityFramework>
</configuration>
EDIT 1
ORA-12154: TNS:could not resolve the connect identifier specified --->
OracleInternal.Network.NetworkException (0x00002F7A): ORA-12154:
TNS:could not resolve the connect identifier specified
OracleInternal.Network.AddressResolution..ctor(String TNSAlias, String
instanceName)
OracleInternal.Network.OracleCommunication.DoConnect(String
tnsDescriptor)
OracleInternal.Network.OracleCommunication.Connect(String
tnsDescriptor, Boolean externalAuth, String instanceName)
OracleInternal.ServiceObjects.OracleConnectionImpl.Connect(ConnectionString
cs, Boolean bOpenEndUserSession, String instanceName)
OracleInternal.ConnectionPool.PoolManager`3.CreateNewPR(Int32
reqCount, Boolean bForPoolPopulation, ConnectionString
csWithDiffOrNewPwd, String instanceName)
OracleInternal.ConnectionPool.PoolManager`3.Get(ConnectionString
csWithDiffOrNewPwd, Boolean bGetForApp, String affinityInstanceName,
Boolean bForceMatch)
OracleInternal.ConnectionPool.OraclePoolManager.Get(ConnectionString
csWithNewPassword, Boolean bGetForApp, String affinityInstanceName,
Boolean bForceMatch)
OracleInternal.ConnectionPool.OracleConnectionDispenser`3.Get(ConnectionString
cs, PM conPM, ConnectionString pmCS, SecureString securedPassword,
SecureString securedProxyPassword)
Oracle.ManagedDataAccess.Client.OracleConnection.Open()
System.Data.EntityClient.EntityConnection.OpenStoreConnectionIf(Boolean
openCondition, DbConnection storeConnectionToOpen, DbConnection
originalConnection, String exceptionCode, String attemptedOperation,
Boolean& closeStoreConnectionOnFailure)}
User contributions licensed under CC BY-SA 3.0