TypeInitializationException: The type initializer for 'MemberInfoC

P

Philip Wagenaar

I have an ASP.NET application that is showing throwing an strange exception
in my Virtual PC environment. We have encoutered this error at a customer
running our product on Virtual Server. At the customer we solved the problem
by giving the Page File a fixed size. This solution does not work in my
Virtual PC environment.

I have searched on the exception that is thrown but cannot find anything
related on the web. So to be honest. I have no clue where to start...

The exception is thrown when I load the ASP.NET application in the browser:
Stack Trace:


[AccessViolationException: Attempted to read or write protected memory. This
is often an indication that other memory is corrupt.]
System.RuntimeType.PrepareMemberInfoCache(RuntimeTypeHandle rt) +0
System.MemberInfoCache`1..cctor() +39

[TypeInitializationException: The type initializer for 'MemberInfoCache`1'
threw an exception.]
System.MemberInfoCache`1..ctor(RuntimeTypeCache runtimeTypeCache) +17
System.RuntimeTypeCache.GetMemberCache(MemberInfoCache`1& m_cache) +64
System.RuntimeType.GetEventCandidates(String name, BindingFlags
bindingAttr, Boolean allowPrefixLookup) +120
System.RuntimeType.GetEvents(BindingFlags bindingAttr) +9

System.ComponentModel.ReflectTypeDescriptionProvider.ReflectGetEvents(Type
type) +264
System.ComponentModel.ReflectedTypeData.GetEvents() +81

System.ComponentModel.DefaultTypeDescriptor.System.ComponentModel.ICustomTypeDescriptor.GetEvents() +50
System.ComponentModel.TypeDescriptor.GetEvents(Type componentType) +26

System.Web.HttpApplication.HookupEventHandlersForApplicationAndModules(MethodInfo[] handlers) +270
System.Web.HttpApplication.InitSpecial(HttpApplicationState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +216
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr
appContext, HttpContext context) +259
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance() +27
System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext
context) +3460678
System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext
context) +125
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext
context) +99
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350
 
P

Philip Wagenaar

Found the problem.

We use a third party tool to obfuscate our binaries. This was the cause of
the problem.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top