Enterprise Library issue

4

We are using Enterprise Library 6.0 and the following code to create database instance and execute a stored procedure? Any help highly appreciated. Thanks in Advance.

 DatabaseProviderFactory factory = new DatabaseProviderFactory();
             Database  db = factory.CreateDefault();

 DbCommand dbCommand = db.GetStoredProcCommand("ProcedureName");

                OracleParameter outval = new OracleParameter("Test", OracleDbType.RefCursor);
                outval.Direction = ParameterDirection.Output;
                dbCommand.Parameters.Add(outval);

                using (IDataReader reader = db.ExecuteReader(dbCommand))
                {
                    while (reader.Read())
                    {

                    }
                }

<add name="providerConnString" connectionString="Data Source=ABCD;Password=testuser;User ID=testpwd" providerName="Oracle.DataAccess.Client" />

Intermittently we are receiving the following exception. This is occurring when we are trying to access the application after an idle time. How the connection pooling happens in enterprise library?How will it work if the application is idle for long time? What is the default min pool size and default max pool size?

Exception has been thrown by the target of an invocation. System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.OracleClientFactory' threw an exception. ---> System.TypeInitializationException: The type initializer for 'Oracle.DataAccess.Client.CThreadPool' threw an exception. ---> System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {CB2F6723-AB3A-11D2-9C40-00C04FA30A3E} failed due to the following error: 800703fa Illegal operation attempted on a registry key that has been marked for deletion. (Exception from HRESULT: 0x800703FA). at Oracle.DataAccess.Client.CThreadPool..cctor() --- End of inner exception stack trace --- at Oracle.DataAccess.Client.OracleInit.Initialize() --- End of inner exception stack trace --- --- End of inner exception stack trace --- at System.RuntimeFieldHandle.GetValue(RtFieldInfo field, Object instance, RuntimeType fieldType, RuntimeType declaringType, Boolean& domainInitialized) at System.Reflection.RtFieldInfo.UnsafeGetValue(Object obj) at System.Reflection.RtFieldInfo.InternalGetValue(Object obj, StackCrawlMark& stackMark) at System.Reflection.RtFieldInfo.GetValue(Object obj) at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow) at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDefaultMapping(String dbProviderName) at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabaseData(ConnectionStringSettings connectionString, DatabaseSettings databaseSettings) at Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSyntheticConfigSettings.GetDatabase(String name) at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseProviderFactory.DatabaseConfigurationBuilder.b__2(String n) at System.Collections.Concurrent.ConcurrentDictionary2.GetOrAdd(TKey key, Func2 valueFactory) at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseProviderFactory.DatabaseConfigurationBuilder.CreateDefault()

c#
asp.net
.net
enterprise-library
asked on Stack Overflow Nov 19, 2014 by kishore • edited Nov 19, 2014 by DJ Burb

1 Answer

0

I had a issue with the App pool identity user in IIS. I removed the identity user and put the default identity user. Then reverted back to my custom user identity. This resolved my issue.

answered on Stack Overflow Oct 29, 2018 by Sibu Abraham

User contributions licensed under CC BY-SA 3.0