473,406 Members | 2,894 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,406 software developers and data experts.

The type initializer threw an exception

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?

Jun 27 '08 #1
3 2278
Does it do something special in the static constructor?

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

"Fredrik Kronander" <Fr**************@discussions.microsoft.comwrote in
message news:30**********************************@microsof t.com...
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?

Jun 27 '08 #2
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.

"Teemu Keiski" wrote:
Does it do something special in the static constructor?

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

"Fredrik Kronander" <Fr**************@discussions.microsoft.comwrote in
message news:30**********************************@microsof t.com...
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?


Jun 27 '08 #3
Ok, that sounds weird then. Are you sure it cannot be initialization of some
of these members?

Teemu

"Fredrik Kronander" <Fr**************@discussions.microsoft.comwrote in
message news:9E**********************************@microsof t.com...
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.

"Teemu Keiski" wrote:
>Does it do something special in the static constructor?

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

"Fredrik Kronander" <Fr**************@discussions.microsoft.comwrote in
message news:30**********************************@microsof t.com...
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?



Jun 27 '08 #4

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

Similar topics

1
by: Colin | last post by:
Hi there, I have wrote a simple console app in C# to get the dimensions for a jpeg file /*** Image img = Image.FromFile(@"C:\TEMP\PvFile\1036437.jpg", true); LogEvent("Height = " +...
0
by: Jonathan G. | last post by:
I'm writing my first windows service. I have a class called 'mainprocess' whose constructor is called by the service class. Within mainprocess, I declare an instance of another class I wrote,...
0
by: mm | last post by:
All I am a newbie to VB.net I define 2 classes and a module with a sub main When I run the program I get this : The type initializer for 'ExpCnv.mainModule1' threw an exception. Any idea Any...
1
by: ibiza | last post by:
Hi all, I have this class: Public Class KanaConverter Private Shared kana As ArrayList Private Shared romanji As ArrayList Shared Sub New() kana = New ArrayList
0
by: batista | last post by:
Hello All, I have windows server 2003 with IIS 6.0.. I have a webservice that is using a vc7 dll which in turn is using a com dll...now.... there is a function there in that vc7 dll that is...
0
by: Rod | last post by:
I've got Crystal Reports XI Release 2, for development with Visual Studio ..NET 2005. I've taken a VS .NET 2003 WinForms application that I wrote in C#, and upgraded it to VS .NET 2005. It has...
0
by: =?Utf-8?B?YmlqYXk=?= | last post by:
The type initializer for 'Microsoft.ApplicationBlocks.Cache.CacheService' threw an exception. We migrated our windows application from 1.1 to 2.0. The debug and Release mode of the application...
4
by: =?Utf-8?B?YmlqYXk=?= | last post by:
We migrated our windows application from 1.1 to 2.0. The debug and Release mode of the application work fine with some tweaking. But when the setup project is migrated to 2.0 the installation gives...
0
by: Schadrach | last post by:
I'm having a strange problem, I have a small executable that runs a backup for a some data nightly, and as of September 22, 2007 it has ceased to function with the following error: Unhandled...
2
by: tshad | last post by:
I got the following error message when I had set a static string value to "" or " "; "The type initializer for "theSettings" threw an exception." "The path is not of a legal form." The...
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: 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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.