1. Add reference: Interop. OracleInProcServer in the WEB application project.
2. Web. config Configuration:
<Configuration>
<Deleetask>
<! -- Database connection information configuration -->
<Add key = "Data Source" value = "DB"/>
<Add key = "User ID" value = "USER"/>
<Add key = "Password" value = "000000"/>
<Add key = "Max Pool Size" value = "100"/>
<Add key = "Min Pool Size" value = "0"/>
<Add key = "Pooling" value = "true"/>
</AppSettings>
......
3. Create an OracleSession object in Global. asax. The Code is as follows:
Using System;
Using System. Collections;
Using System. ComponentModel;
Using System. Web;
Using System. Web. SessionState;
Namespace SparePart
{
/// <Summary>
/// Summary of Global.
/// </Summary>
Public class Global: System. Web. HttpApplication
{
/// <Summary>
/// Required designer variables.
/// </Summary>
Private System. ComponentModel. IContainer components = null;
Static public OracleInProcServer. _ OraSessionClassClass OraSession;
Static public OracleInProcServer. OraDatabase OraDataBase;
Public Global ()
{
InitializeComponent ();
}