64 비트 및 Oracle 10g 데이터베이스와 Visual Studio 2015가있는 Windows 2008 운영 체제를 설치했습니다.
Oracle 데이터베이스 10g에 연결할 수 없습니다.
oracle 10g 데이터베이스를 사용하여 Windows XP에서 작동하는 Visual Studio 2010으로 개발 된 기존 개발 응용 프로그램입니다.
제발 도와주세요.
Can you try the below
1. Include Oracle.ManagedDataAccess.dll in your solution.
2. In web.config, Under Configuration and connectionstrings, include the below
<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="UATDB" descriptor="(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = ORACLEDBIP)(PORT = PORT))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = ORACLE)))"/>
</dataSources>
</version>
</oracle.manageddataaccess.client>
<connectionStrings>
<add name="UATCONNECTIONSTRING" connectionString="Data Source=UATDB;User Id=username;Password=password;Min Pool Size=10; Connection Lifetime=300;Connection Timeout=300;Incr Pool Size=5;Decr Pool Size=2;" providerName="Oracle.DataAccess.Client"/>
</connectionStrings>
3. Refer the dll in your application
using Oracle.ManagedDataAccess;
using (OracleConnection oraConn = new OracleConnection(strOracleConn))
{
oraConn.Open();
OracleCommand oraCommand = new OracleCommand();
oraCommand.CommandType = System.Data.CommandType.StoredProcedure;
oraCommand.CommandText = "sp name";
oraCommand.Connection = oraConn;
}
Web.config file
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="oracle.manageddataaccess.client" type="OracleInternal.Common.ODPMSectionHandler, Oracle.ManagedDataAccess"/>
</configSections>
<oracle.manageddataaccess.client>
<version number="*">
<dataSources>
<dataSource alias="UATDB" descriptor="(DESCRIPTION =(ADDRESS = (PROTOCOL = TCP)(HOST = IP)(PORT = PORT))(CONNECT_DATA =(SERVER = DEDICATED)(SERVICE_NAME = ORACLE)))"/>
</dataSources>
</version>
</oracle.manageddataaccess.client>
<system.web>
<compilation debug="true" targetFramework="4.6.1"/>
<customErrors mode="Off"/>
<httpRuntime executionTimeout="600"/>
<authentication mode="Windows"/>
<authorization>
<deny users="?"/>
</authorization>
<pages controlRenderingCompatibilityVersion="4.0">
<namespaces>
<add namespace="System.Web.Optimization"/>
</namespaces>
<controls>
<add assembly="Microsoft.AspNet.Web.Optimization.WebForms" namespace="Microsoft.AspNet.Web.Optimization.WebForms" tagPrefix="webopt"/>
</controls>
</pages>
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web"/>
</httpModules>
</system.web>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="Newtonsoft.Json" culture="neutral" publicKeyToken="30ad4fe6b2a6aeed"/>
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0"/>
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="WebGrease" culture="neutral" publicKeyToken="31bf3856ad364e35"/>
<bindingRedirect oldVersion="0.0.0.0-1.5.2.14234" newVersion="1.5.2.14234"/>
</dependentAssembly>
</assemblyBinding>
</runtime>
<system.codedom>
<compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701"/>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\"Web\" /optionInfer+"/>
</compilers>
</system.codedom>
<connectionStrings>
<add name="UATCONNECTIONSTRING" connectionString="Data Source=UATDB;User Id=user1;Password=pass12;Min Pool Size=10; Connection Lifetime=300;Connection Timeout=300;Incr Pool Size=5;Decr Pool Size=2;" providerName="Oracle.DataAccess.Client"/>
</connectionStrings>
<appSettings>
</appSettings>
<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<modules>
<remove name="ApplicationInsightsWebTracking"/>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler"/>
</modules>
</system.webServer>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString">
<conversionPattern value="../Logs/RunningLog/WrapperRunningLog-" />
</file>
<rollingStyle value="Date" />
<datePattern value="yyyyMMddHH.lo\g" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level - %message%newline" />
</layout>
</appender>
<appender name="RollingLogFileAppenderUpdateStatus" type="log4net.Appender.RollingFileAppender">
<file type="log4net.Util.PatternString">
<conversionPattern value="../Logs/UpdateStatusLog/StatusLog-" />
</file>
<rollingStyle value="Date" />
<datePattern value="yyyyMMdd.log" />
<staticLogFileName value="false" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date %level - %message%newline" />
</layout>
</appender>
<root>
<level value="ALL" />
</root>
<logger name="RunningLog">
<level value="ALL" />
<appender-ref ref="RollingLogFileAppender" />
</logger>
<logger name="UpdateStatusLog">
<level value="ALL" />
<appender-ref ref="RollingLogFileAppenderUpdateStatus" />
<appender-ref ref="RollingLogFileAppender" />
</logger>
</log4net>
</configuration>
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다