473,382 Members | 1,710 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

TypeInitializationException: The type initializer for 'MemberInfoC

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(RuntimeT ypeHandle 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(MemberInfoC ache`1& m_cache) +64
System.RuntimeType.GetEventCandidates(String name, BindingFlags
bindingAttr, Boolean allowPrefixLookup) +120
System.RuntimeType.GetEvents(BindingFlags bindingAttr) +9

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

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

System.Web.HttpApplication.HookupEventHandlersForA pplicationAndModules(MethodInfo[] handlers) +270
System.Web.HttpApplication.InitSpecial(HttpApplica tionState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +216
System.Web.HttpApplicationFactory.GetSpecialApplic ationInstance(IntPtr
appContext, HttpContext context) +259
System.Web.HttpApplicationFactory.GetSpecialApplic ationInstance() +27
System.Web.HttpApplicationFactory.FireApplicationO nStart(HttpContext
context) +3460678
System.Web.HttpApplicationFactory.EnsureAppStartCa lled(HttpContext
context) +125
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext
context) +99
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +350


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433

Sep 12 '08 #1
1 2235
Found the problem.

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

"Philip Wagenaar" wrote:
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(RuntimeT ypeHandle 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(MemberInfoC ache`1& m_cache) +64
System.RuntimeType.GetEventCandidates(String name, BindingFlags
bindingAttr, Boolean allowPrefixLookup) +120
System.RuntimeType.GetEvents(BindingFlags bindingAttr) +9

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

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

System.Web.HttpApplication.HookupEventHandlersForA pplicationAndModules(MethodInfo[] handlers) +270
System.Web.HttpApplication.InitSpecial(HttpApplica tionState state,
MethodInfo[] handlers, IntPtr appContext, HttpContext context) +216
System.Web.HttpApplicationFactory.GetSpecialApplic ationInstance(IntPtr
appContext, HttpContext context) +259
System.Web.HttpApplicationFactory.GetSpecialApplic ationInstance() +27
System.Web.HttpApplicationFactory.FireApplicationO nStart(HttpContext
context) +3460678
System.Web.HttpApplicationFactory.EnsureAppStartCa lled(HttpContext
context) +125
System.Web.HttpApplicationFactory.GetApplicationIn stance(HttpContext
context) +99
System.Web.HttpRuntime.ProcessRequestInternal(Http WorkerRequest wr) +350


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.1433;
ASP.NET Version:2.0.50727.1433
Sep 16 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sagaert Johan | last post by:
this code using System; using System.Net.Sockets; namespace ConsoleApplication1 { /// <summary> /// Summary description for Class1. /// </summary>
3
by: nick | last post by:
The program runs well on Local harddisk. But it always popup the exception if I run it on Netware mapping disk. After debugger say there is no source code on the exception. Also the following error...
0
by: user | last post by:
After starting a Windows Forms Application developed with VS 2005 Prof Beta 2, built in "Release" mode, I get "An unhandled exception of type 'System.TypeInitializationException' " When...
1
by: Dino M. Buljubasic | last post by:
Hi, I am receiving an exception each time I open one of my projects in VB.net. I do not have to run it, I just open the project and a Message box pops up with the message: ...
0
by: MJ | last post by:
I have an application that I am test deploying to others in my company. The application runs fine in the IDE as well as from the exe on my PC. However, when I install the program on another PC I...
1
by: js | last post by:
I got the following error and trace while trying to launch the applicaiton. The application is installed on a Windows 2003 Server running IIS6 with both Enterprise Library June 2005 and Jan 2006...
0
by: =?Utf-8?B?RGF2ZQ==?= | last post by:
I am unable to execute the following statement in my current project. The class PosExplorer is in a dll file. PosExplorer explorer = new PosExplorer() but now I get this dreaded exception...
1
by: madankarmukta | last post by:
Hi all, I am getting the error "The type initializer for "MyExeName.LibraryName" threw an exception." where liraryName Class have the Static constructor and the private...
0
by: =?Utf-8?B?TWFyY3VzIFNjaGFlZmVy?= | last post by:
Hi everybody, I'm working on my application for appr. 2 years and now suddenly I got an System.TypeInitializationException in one of my global modules. The error is thrown at the first call of a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.