Hi
I'm developing a small desktop client and I'm using the Offline Application Block. When I run my application (both in Debug and Release mode) in Visual Studio 2005 it works fine, but when I publish my application it won't run. I hope someone out there can point me in the right direction since I'm having a hard time finding a solution.
The error:
<br />
Timestamp: 05-02-2008 08:23:14<br />
Message: HandlingInstanceID: 6dadd0fb-233b-44ba-829e-fb4963a24de1<br />
An exception of type 'System.Reflection.TargetInvocationException' occurred and was caught.<br />
-------------------------------------------------------------------------------------------<br />
02/05/2008 09:23:14<br />
Type : System.Reflection.TargetInvocationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
Message : Exception has been thrown by the target of an invocation.<br />
Source : mscorlib<br />
Help link : <br />
Data : System.Collections.ListDictionaryInternal<br />
TargetSite : System.Object _InvokeMethodFast(System.Object, System.Object[], System.SignatureStruct ByRef, System.Reflection.MethodAttributes, System.RuntimeTypeHandle)<br />
Stack Trace : at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)<br />
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)<br />
at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)<br />
at Microsoft.Practices.ObjectBuilder.CreationStrategy.InitializeObject(IBuilderContext context, Object existing, String id, ICreationPolicy policy)<br />
at Microsoft.Practices.ObjectBuilder.CreationStrategy.BuildUpNewObject(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.CreationStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.ReflectionStrategy`1.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.ReflectionStrategy`1.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.ReflectionStrategy`1.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.SingletonStrategy.BuildUp(IBuilderContext context, Type typeToBuild, Object existing, String idToBuild)<br />
at Microsoft.Practices.ObjectBuilder.TypeMappingStrategy.BuildUp(IBuilderContext context, Type t, Object existing, String id)<br />
at Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)<br />
at Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[] transientPolicies)<br />
at Microsoft.Practices.CompositeUI.Collections.ServiceCollection.BuildFirstTimeItem(Type typeToBuild, Type typeToRegisterAs, Object item)<br />
at Microsoft.Practices.CompositeUI.Collections.ServiceCollection.Build(Type typeToBuild, Type typeToRegisterAs, Object serviceInstance)<br />
at Microsoft.Practices.CompositeUI.Collections.ServiceCollection.AddNew[TService,TRegisterAs]()<br />
at BI2ActiveSalesClient.Infrastructure.Library.SmartClientApplication`2.AddServices()<br />
at Microsoft.Practices.CompositeUI.CabApplication`1.Run()<br />
at BI2ActiveSalesClient.Infrastructure.Shell.ShellApplication.RunInReleaseMode()<br />
<br />
Additional Info:<br />
<br />
MachineName : XXXXXXXX<br />
TimeStamp : 05-02-2008 08:23:14<br />
FullName : Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=3.1.0.0, Culture=neutral, PublicKeyToken=null<br />
AppDomainName : DefaultDomain<br />
ThreadIdentity : <br />
WindowsIdentity : XXXXXXXXXXX<br />
Inner Exception<br />
---------------<br />
Type : System.TypeInitializationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
Message : The type initializer for 'Microsoft.ApplicationBlocks.Cache.CacheManager' threw an exception.<br />
Source : Microsoft.ApplicationBlocks.Cache<br />
Help link : <br />
TypeName : Microsoft.ApplicationBlocks.Cache.CacheManager<br />
Data : System.Collections.ListDictionaryInternal<br />
TargetSite : Microsoft.ApplicationBlocks.Cache.CacheManager GetCacheManager()<br />
Stack Trace : at Microsoft.ApplicationBlocks.Cache.CacheManager.GetCacheManager()<br />
at Microsoft.ApplicationBlocks.SmartClient.Offline.OfflineBlockBuilder..ctor()<br />
at Microsoft.ApplicationBlocks.SmartClient.Offline.OfflineBlockBuilder.get_Instance()<br />
at BI2ActiveSalesClient.Infrastructure.ConnectionModule.Services.ConnectionManager..ctor()<br />
<br />
Inner Exception<br />
---------------<br />
Type : System.TypeInitializationException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
Message : The type initializer for 'Microsoft.ApplicationBlocks.Cache.CacheService' threw an exception.<br />
Source : Microsoft.ApplicationBlocks.Cache<br />
Help link : <br />
TypeName : Microsoft.ApplicationBlocks.Cache.CacheService<br />
Data : System.Collections.ListDictionaryInternal<br />
TargetSite : Microsoft.ApplicationBlocks.Cache.CacheService GetCacheService()<br />
Stack Trace : at Microsoft.ApplicationBlocks.Cache.CacheService.GetCacheService()<br />
at Microsoft.ApplicationBlocks.Cache.CacheManager..ctor()<br />
at Microsoft.ApplicationBlocks.Cache.CacheManager..cctor()<br />
<br />
Inner Exception<br />
---------------<br />
Type : System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
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.<br />
Source : Microsoft.ApplicationBlocks.Cache<br />
Help link : <br />
Data : System.Collections.ListDictionaryInternal<br />
TargetSite : Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm CreateInstance(Microsoft.ApplicationBlocks.Cache.CacheService, Microsoft.ApplicationBlocks.Cache.ICacheStorage, Microsoft.ApplicationBlocks.Cache.ICacheMetadata)<br />
Stack Trace : at Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService cacheService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata)<br />
at Microsoft.ApplicationBlocks.Cache.CacheService..ctor()<br />
at Microsoft.ApplicationBlocks.Cache.CacheService..cctor()<br />
<br />
Inner Exception<br />
---------------<br />
Type : System.ArgumentNullException, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089<br />
Message : The cache storage cannot be null.<br />
Parameter name: cacheStorage<br />
Source : Microsoft.ApplicationBlocks.Cache<br />
Help link : <br />
ParamName : cacheStorage<br />
Data : System.Collections.ListDictionaryInternal<br />
TargetSite : Void Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(Microsoft.ApplicationBlocks.Cache.CacheService, Microsoft.ApplicationBlocks.Cache.ICacheStorage, Microsoft.ApplicationBlocks.Cache.ICacheMetadata, System.Xml.XmlNode)<br />
Stack Trace : at Microsoft.ApplicationBlocks.Cache.Scavenging.LruScavenging.Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm.Init(CacheService cachingService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata, XmlNode configSection)<br />
at Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService cacheService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata)<br />
Thanks in advance
Søren
|