[英]System.AccessViolationException with Dynamic Proxy Generation
我們正在使用PostSharp注入緩存功能,我們僅在使用它時才看到此問題。 當我們使用Spring時,問題似乎消失了。
任何幫助將不勝感激,因為這個問題很難復制。 我在下面包括了堆棧跟蹤:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. at System.Diagnostics.SymbolStore.SymWriter.CloseMethod() at System.Reflection.Emit.MethodBuilder.CreateMethodBodyHelper(ILGenerator il) at System.Reflection.Emit.TypeBuilder.CreateTypeNoLock() at System.Reflection.Emit.TypeBuilder.CreateType() at Castle.DynamicProxy.Generators.Emitters.AbstractTypeEmitter.BuildType() at Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateCode(Type[] interfaces, ProxyGenerationOptions options) at Castle.DynamicProxy.DefaultProxyBuilder.CreateClassProxy(Type theClass, Type[] interfaces, ProxyGenerationOptions options) at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type targetType, Type[] interfaces, ProxyGenerationOptions options, Object[] constructorArgs, IInterceptor[] interceptors) at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type targetType, Type[] interfaces, IInterceptor[] interceptors) at NHibernate.Proxy.Poco.Castle.CastleProxyFactory.GetProxy(Object id, ISessionImplementor session)
我遇到了類似的問題,可以通過配置來解決:應用程序池->高級設置->將“啟用32位應用程序”設置為True
重新啟動IIS和WebSite。
我正在研究的項目遇到了類似的重復性問題,該問題大量使用了Rhino Mocks。
模擬大量不同的接口時,它會在64位計算機上的.NET 3.5中發生。
.NET 4.0 Beta似乎沒有此問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.