1、先在WEB应用程序项目中添加引用:Interop.OracleInProcServer
2、Web.config的配置:
……
3、Global.asax中创建OracleSession对象,代码如下:
using System;
using System.Collections;
using System.ComponentModel;
using System.Web;
using System.Web.SessionState;
namespace SparePart
{
///
/// Global 的摘要说明。
///
public class Global : System.Web.HttpApplication
{
///
/// 必需的设计器变量。
///
private System.ComponentModel.IContainer components = null;
static public OracleInProcServer._OraSessionClassClass OraSession;
static public OracleInProcServer.OraDatabase OraDataBase;
public Global()
{
InitializeComponent();
}