The profiler is initialized right after the IOC is initialized when the ServiceHostFactory is created. The first hit to the DB is pulling name/value records from a settings table containing 6 rows. This is where it is dying. Could this be related to transient connection issues with the DB server? This is the issue I am trying to ultimately trying to run to ground.
StackTrace:
Exception:Unable to cast object of type 'HibernatingRhinos.Profiler.Appender.ProfiledDataAccess.ProfiledConnection`1[System.Data.SqlClient.SqlClientFactory]' to type 'System.Data.SqlClient.SqlConnection'. Stack: at System.Data.SqlClient.SqlCommand.set_DbConnection(DbConnection value)
at System.Data.Common.Utils.CommandHelper.SetStoreProviderCommandState(EntityCommand entityCommand, EntityTransaction entityTransaction, DbCommand storeProviderCommand)
at System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
at System.Data.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable<T>.GetEnumerator()
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source)
at System.Linq.Queryable.Count[TSource](IQueryable`1 source)
at System.Data.Entity.Migrations.History.HistoryRepository.Exists(HistoryContext context)
at System.Data.Entity.Migrations.History.HistoryRepository.GetLastModel(String& migrationId)
at System.Data.Entity.Migrations.History.HistoryRepository.GetLastModel()
at System.Data.Entity.Internal.ModelCompatibilityChecker.CompatibleWithModel(InternalContext internalContext, ModelHashCalculator modelHashCalculator, Boolean throwIfNoMetadata)
at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context)
at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action)
at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization()
at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input)
at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action)
at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType)
at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize()
at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator()
at ARI.Catalog.AUS.WebServices.WebServiceSettings.Hydrate() in d:\SourceCode\ARIUpdateService\src\ARI.Catalog.AUS.WebServices\WebServiceSettings.cs:line 102
at ARI.Catalog.AUS.WebServices.WebServiceSettings.GetSetting[T](String name, T& value) in d:\SourceCode\ARIUpdateService\src\ARI.Catalog.AUS.WebServices\WebServiceSettings.cs:line 85
at ARI.Catalog.AUS.WebServices.WebServiceSettings.GetSetting[T](String name, T defaultValue) in d:\SourceCode\ARIUpdateService\src\ARI.Catalog.AUS.WebServices\WebServiceSettings.cs:line 76
at ARI.Catalog.AUS.WebServices.Wcf.AUSService_V2.GetUpdates(UpdateRequestDTO_V2 request) in d:\SourceCode\ARIUpdateService\src\ARI.Catalog.AUS.WebServices\Soap\AgentService\AUSService_V2.cs:line 128
On Wednesday, July 31, 2013 8:11:35 AM UTC-6, Dan Durland wrote: