1

我的网站在本地工作,但在主机上我收到错误:

“操作可能会破坏运行时的稳定性。”

我正在使用休眠。我正在使用存储库模式。

[VerificationException: Operation could destabilize the runtime.]
   CategoryProxy..ctor() +6

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +86
   System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +230
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +67
   LinFu.DynamicProxy.ProxyFactory.CreateProxy(Type instanceType, IInterceptor interceptor, Type[] baseInterfaces) +20
   NHibernate.ByteCode.LinFu.ProxyFactory.GetProxy(Object id, ISessionImplementor session) +208

[HibernateException: Creating a proxy instance failed]
   NHibernate.ByteCode.LinFu.ProxyFactory.GetProxy(Object id, ISessionImplementor session) +306
4

2 回答 2

1

使用城堡动态代理

于 2009-12-04T14:43:31.737 回答
0

这曾经发生在我身上。检查您的代码是否包含较长的 switch 子句。从这里:http ://forums.asp.net/p/981415/1255521.aspx

于 2009-12-03T16:07:39.173 回答