Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / May 2008

Tip: Looking for answers? Try searching our database.

The type initializer threw an exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredrik Kronander - 28 May 2008 20:00 GMT
Hi,

I have an ASP.NET application that uses a static class for caching xml
document and compiled xsl transforms. This has been working fine up until now
when I'm trying to install it to an additional webserver (we had 4
previously), which gives me the error "The type initializer for
"ChrossNet.Cache" threw an exception" where ChrossNet.Cache is my static
class. The code is exactly the same of course.

As far as I can see there are no differences between the servers, but as I'm
having a problem something must differ - I just don't really know where to
look.

Has anyone else seen this problem?
Teemu Keiski - 29 May 2008 16:26 GMT
Does it do something special in the static constructor?

Signature

Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

> Hi,
>
[quoted text clipped - 12 lines]
>
> Has anyone else seen this problem?
Fredrik Kronander - 29 May 2008 17:06 GMT
Thanks for your reply.

No, it doesn't do anything at all in the constructor. The class has some
static member variables that will be initialized on the first hit, but that
is done in the get methods, not in the constructor.

> Does it do something special in the static constructor?
>
[quoted text clipped - 14 lines]
> >
> > Has anyone else seen this problem?
Teemu Keiski - 29 May 2008 17:41 GMT
Ok, that sounds weird then. Are you sure it cannot be initialization of some
of these members?

Teemu

> Thanks for your reply.
>
[quoted text clipped - 25 lines]
>> >
>> > Has anyone else seen this problem?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.