The type initializer threw an exception

  • Thread starter Thread starter Fredrik Kronander
  • Start date Start date
F

Fredrik Kronander

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?
 
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.
 
Ok, that sounds weird then. Are you sure it cannot be initialization of some
of these members?

Teemu
 
Back
Top