This project is read-only.


Mini profiler module throwing, even if feature is disabled


Seeing the following in logs:

2012-08-21 17:43:24,871 [5] NHibernate.Transaction.ITransactionFactory - DTC transaction prepre phase failed
System.InvalidCastException: Unable to cast object of type 'StackExchange.Profiling.Data.ProfiledDbCommand' to type 'System.Data.SqlClient.SqlCommand'.
at NHibernate.AdoNet.SqlClientBatchingBatcher.AddToBatch(IExpectation expectation)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Boolean[] notNull, Int32 j, SqlCommandInfo sql, Object obj, ISessionImplementor session)
at NHibernate.Persister.Entity.AbstractEntityPersister.Insert(Object id, Object[] fields, Object obj, ISessionImplementor session)
at NHibernate.Action.EntityInsertAction.Execute()
at NHibernate.Engine.ActionQueue.Execute(IExecutable executable)
at NHibernate.Engine.ActionQueue.ExecuteActions(IList list)
at NHibernate.Engine.ActionQueue.ExecuteActions()
at NHibernate.Event.Default.AbstractFlushingEventListener.PerformExecutions(IEventSource session)
at NHibernate.Event.Default.DefaultFlushEventListener.OnFlush(FlushEvent event)
at NHibernate.Impl.SessionImpl.Flush()
at NHibernate.Transaction.AdoNetWithDistributedTransactionFactory.DistributedTransactionContext.System.Transactions.IEnlistmentNotification.Prepare(PreparingEnlistment preparingEnlistment)


BertrandLeRoy wrote Aug 22, 2012 at 3:10 AM

This prevents any content item changes from being persisted. I verified that completely removing the mini profiler module solves the problem and enables contents to be persisted again.

Sarkie wrote Sep 20, 2012 at 12:03 PM

Yeah this bit me when enabling all the modules in 1.6.

Also had to delete mappings.bin to get the site up and running again.

sebastienros wrote Sep 27, 2012 at 12:18 AM

Fixed in changeset 3ae0493e7a59

sfmskywalker wrote Mar 28, 2014 at 1:28 AM

Fixed in changeset ade44206de005663fee48d24dad5e67e948038c7

beebul wrote May 1, 2014 at 1:32 AM

I'm having issues trying to disable the module on an Orchard 1.7 site (production).

Don't have the same issue locally.

I deleted dependencies and the mapping.bin, removed the module folder etc but my site just won't operate without MiniProfiler installed and enabled.