Ninject, Database Connection and Separate Application Pools for Same Website
===

I am using Ninject to use the same database connection per request.  We have a route called RosterProcess that is another web application inside the root, but using the same code base so we can have two different application pools. I believe the application pools are causing an issue. I am getting the error below and not sure why?

**Global.asax**

    kernel.Bind<IDatabaseFactory>().To<DatabaseFactory<MySqlConnection>>().InRequestScope().WithConstructorArgument("connectionString", Config.Data.MySQLConnection);

**Factory**

    public class DatabaseFactory<T> : Disposable, IDatabaseFactory where T : IDbConnection, new()
        {
            private readonly string _connectionString;
            private  IDbConnection _dataConnection;
    
            public DatabaseFactory(string connectionString)
            {
                _connectionString = connectionString;
            }
    
            #region IDatabaseFactory Members
    
            public IDbConnection Get()
            {
                return _dataConnection ?? (_dataConnection = new T { ConnectionString = _connectionString });
            }
    
            #endregion
    
            protected override void DisposeCore()
            {
                if (_dataConnection != null)
                    _dataConnection.Dispose();
            }
        }


> Object reference not set to an instance of an object. at
> MySql.Data.MySqlClient.MySqlDataReader.Close() at
> MySql.Data.MySqlClient.MySqlConnection.Close() at
> MySql.Data.MySqlClient.MySqlConnection.Dispose(Boolean disposing) at
> System.ComponentModel.Component.Dispose() at
> CL.NatGeo.Dashboard.Data.Infrastructure.DatabaseFactory`1.DisposeCore()
> at CL.NatGeo.Dashboard.Data.Infrastructure.Disposable.Dispose() at
> Ninject.Activation.Strategies.DisposableStrategy.<Deactivate>b__0(IDisposable
> x) at Ninject.Activation.InstanceReference.IfInstanceIs[T](Action`1
> action) at
> Ninject.Activation.Strategies.DisposableStrategy.Deactivate(IContext
> context, InstanceReference reference) at
> Ninject.Activation.Pipeline.<>c__DisplayClass6.<Deactivate>b__4(IActivationStrategy
> s) at
> Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map[T](IEnumerable`1
> series, Action`1 action) at
> Ninject.Activation.Pipeline.Deactivate(IContext context,
> InstanceReference reference) at
> Ninject.Activation.Caching.Cache.Forget(CacheEntry entry) at
> Ninject.Activation.Caching.Cache.Forget(IEnumerable`1 cacheEntries) at
> Ninject.Activation.Caching.Cache.Clear(Object scope) at
> Ninject.OnePerRequestModule.<>c__DisplayClass5.<DeactivateInstancesForCurrentHttpRequest>b__3(ICache
> cache) at
> Ninject.Infrastructure.Language.ExtensionsForIEnumerableOfT.Map[T](IEnumerable`1
> series, Action`1 action) at
> Ninject.OnePerRequestModule.DeactivateInstancesForCurrentHttpRequest()
> at Ninject.OnePerRequestModule.<Init>b__0(Object o, EventArgs e) at
> System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
> at System.Web.HttpApplication.ExecuteStep(IExecutionStep step,
> Boolean& completedSynchronously)</
