Search code examples
.netasp.netodp.netcassini

ODP.NET calls hanging when used with Casini


I am having a problem trying to instantiate Oracle.DataAccess.Client objects in a web application.

To test this I created a new asp.net web application and inserted the following code into the code behind of Default.aspx:

    protected void Page_Load(object sender, EventArgs e)
    {
        Oracle.DataAccess.Client.OracleConnection conn = new Oracle.DataAccess.Client.OracleConnection();
        Oracle.DataAccess.Client.OracleCommand client = new Oracle.DataAccess.Client.OracleCommand(); 
    }

The call to OracleConnection() will take 2.5 minutes to return but OracleCommand() will be fast. If I reverse the order of the 2 calls the opposite will occur and OracleCommand() will hang instead.

If I deploy this code to IIS, it works fine so my problem is only with Casini. Has anyone come across this problem before or have any ideas for me? I have tried reinstalling the oracle client and visual studio, I have even tried an older version of the oracle client (112012 instead of 112021) with the same results.

Also, I am working on a new Windows 7 machine and I did not experience this problem on my previous machine.

Thanks.


Solution

  • Maybe you should consider using IIS Express instead of Cassini?