Hi, did this resolve it for you?

We are experiencing the same problems, we have seperate IIS-accounts and no 
scheduled tasks are run by the IIS-user.

On Thursday, December 13, 2012 6:10:02 PM UTC+1, PeteA wrote:
>
> Just in case anybody else runs into the same problem, we believe that 
> we've found the cause & solution though only checked in test environment so 
> far.  It's got nothing to do with NHibernate but is actually a bug in 
> Windows (Vista onwards) where the IIS application pool's profile was 
> unloaded after a scheduled task ran with the same account credentials (said 
> task is a daily job that's part of the same application, hence shares the 
> service account).  There's a GP setting which resolves it, or simply 
> running the scheduled task with different credentials - see 
> http://blogs.msdn.com/b/distributedservices/archive/2009/11/06/a-com-server-application-may-stop-working-on-windows-server-2008.aspx.
>  
>
>
>  
>
> This solution was found without the use of 
> goats.<http://www.staff.uni-mainz.de/neuffer/scsi/fun.html>
>
>  
>
> /Pete
>
>  
>
> -----Original Message-----
> From: [email protected] <javascript:> [mailto:
> [email protected] <javascript:>] On Behalf Of Pete Appleton
> Sent: 13 December 2012 12:29
> To: [email protected] <javascript:>
> Subject: [nhusers] Creating a proxy instance failed with 
> REGDB_E_CLASSNOTREG
>
>  
>
> Hi,
>
>  
>
> We've encountered the stack trace below twice in an ASP.NET application
>
> but have no clues as to the cause or how to reproduce it.  Does anybody
>
> else have any knowledge or experience of this please, or even just a
>
> couple of goats we can sacrifice?  Our concrete knowledge can be
>
> summarised as the following:
>
>  
>
> - NHibernate v3.3.1 + Envers 1.4GA
>
> - In both cases it occurred when a user logged on
>
> - In one case this was the first logon of the day, in the other it was
>
> not
>
> - In both cases it was resolved by recycling the application pool
>
> - Until the app pool was recycled the site was completely unusable
>
>  
>
> Thanks,
>
>  
>
> Pete
>
>  
>
>  
>
> 2012-12-13 05:09:59,543 [7]: ERROR NHibernate.Proxy.DefaultProxyFactory
>
> - Creating a proxy instance failed
>
> System.Runtime.InteropServices.COMException (0x80040154): Class not
>
> registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
>
>    at
>
> System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule(RuntimeAssemb
>
> ly containingAssembly, Boolean emitSymbolInfo, String name, String
>
> filename, StackCrawlMarkHandle stackMark, IntPtr& pInternalSymWriter,
>
> ObjectHandleOnStack retModule, Boolean fIsTransient, Int32& tkFile)
>
>    at
>
> System.Reflection.Emit.AssemblyBuilder.DefineDynamicModuleInternalNoLock
>
> (String name, String fileName, Boolean emitSymbolInfo, StackCrawlMark&
>
> stackMark)
>
>    at
>
> System.Reflection.Emit.AssemblyBuilder.DefineDynamicModuleInternal(Strin
>
> g name, String fileName, Boolean emitSymbolInfo, StackCrawlMark&
>
> stackMark)
>
>    at System.Reflection.Emit.AssemblyBuilder.DefineDynamicModule(String
>
> name, String fileName, Boolean emitSymbolInfo)
>
>    at
>
> NHibernate.Proxy.DynamicProxy.DefaultProxyAssemblyBuilder.DefineDynamicM
>
> odule(AssemblyBuilder assemblyBuilder, String moduleName)
>
>    at
>
> NHibernate.Proxy.DynamicProxy.ProxyFactory.CreateUncachedProxyType(Type
>
> baseType, Type[] baseInterfaces)
>
>    at NHibernate.Proxy.DynamicProxy.ProxyFactory.CreateProxyType(Type
>
> baseType, Type[] interfaces)
>
>    at NHibernate.Proxy.DynamicProxy.ProxyFactory.CreateProxy(Type
>
> instanceType, IInterceptor interceptor, Type[] baseInterfaces)
>
>    at NHibernate.Proxy.DefaultProxyFactory.GetProxy(Object id,
>
> ISessionImplementor session)
>
>    at NHibernate.Tuple.Entity.AbstractEntityTuplizer.CreateProxy(Object
>
> id, ISessionImplementor session)
>
>    at
>
> NHibernate.Persister.Entity.AbstractEntityPersister.CreateProxy(Object
>
> id, ISessionImplementor session)
>
>    at
>
> NHibernate.Event.Default.DefaultLoadEventListener.CreateProxyIfNecessary
>
> (LoadEvent event, IEntityPersister persister, EntityKey keyToLoad,
>
> LoadType options, IPersistenceContext persistenceContext)
>
>    at
>
> NHibernate.Event.Default.DefaultLoadEventListener.ProxyOrLoad(LoadEvent
>
> event, IEntityPersister persister, EntityKey keyToLoad, LoadType
>
> options)
>
>    at NHibernate.Event.Default.DefaultLoadEventListener.OnLoad(LoadEvent
>
> event, LoadType loadType)
>
>   at NHibernate.Impl.SessionImpl.FireLoad(LoadEvent event, LoadType
>
> loadType)
>
>    at NHibernate.Impl.SessionImpl.InternalLoad(String entityName, Object
>
> id, Boolean eager, Boolean isNullable)
>
>    at NHibernate.Type.EntityType.ResolveIdentifier(Object id,
>
> ISessionImplementor session)
>
>    at NHibernate.Type.EntityType.ResolveIdentifier(Object value,
>
> ISessionImplementor session, Object owner)
>
>    at NHibernate.Engine.TwoPhaseLoad.InitializeEntity(Object entity,
>
> Boolean readOnly, ISessionImplementor session, PreLoadEvent
>
> preLoadEvent, PostLoadEvent postLoadEvent)
>
>    at NHibernate.Loader.Loader.InitializeEntitiesAndCollections(IList
>
> hydratedObjects, Object resultSetId, ISessionImplementor session,
>
> Boolean readOnly)
>
>    at NHibernate.Loader.Loader.DoQuery(ISessionImplementor session,
>
> QueryParameters queryParameters, Boolean returnProxies)
>
>    at
>
> NHibernate.Loader.Loader.DoQueryAndInitializeNonLazyCollections(ISession
>
> Implementor session, QueryParameters queryParameters, Boolean
>
> returnProxies)
>
>    at NHibernate.Loader.Loader.LoadCollection(ISessionImplementor
>
> session, Object id, IType type)
>
>    at NHibernate.Loader.Collection.CollectionLoader.Initialize(Object
>
> id, ISessionImplementor session)
>
>    at
>
> NHibernate.Persister.Collection.AbstractCollectionPersister.Initialize(O
>
> bject key, ISessionImplementor session)
>
>    at
>
> NHibernate.Event.Default.DefaultInitializeCollectionEventListener.OnInit
>
> ializeCollection(InitializeCollectionEvent event)
>
>    at
>
> NHibernate.Impl.SessionImpl.InitializeCollection(IPersistentCollection
>
> collection, Boolean writing)
>
>    at
>
> NHibernate.Collection.AbstractPersistentCollection.Initialize(Boolean
>
> writing)
>
>    at NHibernate.Collection.AbstractPersistentCollection.Read()
>
>    at
>
> NHibernate.Collection.Generic.PersistentGenericSet`1.System.Collections.
>
> Generic.IEnumerable<T>.GetEnumerator()
>
>    at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
>
>    at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
>
>    at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
>
>    at XXX.WebSite.Models.UserModel..ctor(User user)
>
>    at XXX.WebSite.Controllers.SessionController.Login(LoginModel logon)
>
>  
>
> -- 
>
> You received this message because you are subscribed to the Google Groups 
> "nhusers" group.
>
> To post to this group, send email to [email protected]<javascript:>
> .
>
> To unsubscribe from this group, send email to 
> [email protected] <javascript:>.
>
> For more options, visit this group at 
> http://groups.google.com/group/nhusers?hl=en.
>
>  
>
>  
>
> !DSPAM:1,50c9ca4980901945357274!
>
>  
>
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to