The type initializer threw an exception

G

Guest

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 the follwing error:

Message:The type initializer for
'Microsoft.ApplicationBlocks.Cache.CacheService'
threw an exception.


- <ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="TestDev"
ExceptionManager.TimeStamp="2/7/2007 1:06:36 PM"
ExceptionManager.FullName="Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1913.30369, Culture=neutral, PublicKeyToken=null"
ExceptionManager.AppDomainName="sst.exe" ExceptionManager.ThreadIdentity=""
ExceptionManager.WindowsIdentity="TRADERPUBDEV\user" />
- <Exception ExceptionType="System.ArgumentNullException" Message="The cache
storage cannot be null. Parameter name: cacheStorage"
ParamName="cacheStorage" Data="System.Collections.ListDictionaryInternal"
TargetSite="Void
Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(Microsoft.ApplicationBlocks.Cache.CacheService,
Microsoft.ApplicationBlocks.Cache.ICacheStorage,
Microsoft.ApplicationBlocks.Cache.ICacheMetadata, System.Xml.XmlNode)"
Source="Microsoft.ApplicationBlocks.Cache">
<StackTrace>at
Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging.Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(CacheService
cachingService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata,
XmlNode configSection)</StackTrace>
</Exception>
</ExceptionInformation>
- <ExceptionInformation>
<AdditionalInformationProperty ExceptionManager.MachineName="TestDev"
ExceptionManager.TimeStamp="2/7/2007 1:06:40 PM"
ExceptionManager.FullName="Microsoft.ApplicationBlocks.ExceptionManagement,
Version=1.0.1913.30369, Culture=neutral, PublicKeyToken=null"
ExceptionManager.AppDomainName="Sales Studio.exe"
ExceptionManager.ThreadIdentity=""
ExceptionManager.WindowsIdentity="TRADERPUBDEV\user" />
- <Exception ExceptionType="System.Exception" Message="The XML configuration
document is invalid, the ScavengingInfo section defines a type (assembly:
'Microsoft.ApplicationBlocks.Cache', type
'Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging') which an
instance can't be created." Data="System.Collections.ListDictionaryInternal"
TargetSite="Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm
CreateInstance(Microsoft.ApplicationBlocks.Cache.CacheService,
Microsoft.ApplicationBlocks.Cache.ICacheStorage,
Microsoft.ApplicationBlocks.Cache.ICacheMetadata)"
Source="Microsoft.ApplicationBlocks.Cache">
<StackTrace>at
Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService
cacheService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata) at
Microsoft.ApplicationBlocks.Cache.CacheService..ctor()</StackTrace>
- <Exception ExceptionType="System.ArgumentNullException" Message="The cache
storage cannot be null. Parameter name: cacheStorage"
ParamName="cacheStorage" Data="System.Collections.ListDictionaryInternal"
TargetSite="Void
Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(Microsoft.ApplicationBlocks.Cache.CacheService,
Microsoft.ApplicationBlocks.Cache.ICacheStorage,
Microsoft.ApplicationBlocks.Cache.ICacheMetadata, System.Xml.XmlNode)"
Source="Microsoft.ApplicationBlocks.Cache">
<StackTrace>at
Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging.Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(CacheService
cachingService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata,
XmlNode configSection) at
Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService
cacheService, ICacheStorage cacheStorage, ICacheMetadata
cacheMetadata)</StackTrace>
</Exception>
</Exception>
</ExceptionInformation>
 
L

Laura T.

Did you notice this in your exception trace:

"
- <Exception ExceptionType="System.ArgumentNullException" Message="The cache
storage cannot be null. Parameter name: cacheStorage"
"
 
G

Guest

Yes, I have. We are using applicationblock version 1.0 for caching. it works
fine with framework 1.0. But when we migrated our application to 2.0 the
application works fine on VS 2005 IDE (both Release and Debug). When we
create a set-up package and install the follwing error occurs.
 
G

Guest

We know that. But we don't know if anything has changed as far as 'config' or
'ref' is concerned when Applicationblocks 1.0 cache dll is used on frameowrk
2.0 applications.
 

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