locked
Problems with Release version of application. RRS feed

  • Question

  • User-1550876740 posted

    I am encountering an error with the Release version of an ASP.Net 2.0 application I am developing. The application runs fine when built with the Debug configuration.

    The application was originally developed using Visual Studio 2003 and converted to 2005. It uses the Microsoft Caching Application Block (among others) which is where the error seems to originate from. The error recorded in the event log is shown below. Can anyone shed any light on why the Debug configuration runs fine and the Release does not and what I can do to rectify it?

    Thanks

     General Information

    *********************************************

    Additional Info:

    ExceptionManager.MachineName: OPTIONS046

    ExceptionManager.TimeStamp: 30/01/2007 12:54:08

    ExceptionManager.FullName: Microsoft.ApplicationBlocks.ExceptionManagement, Version=1.0.2582.14284, Culture=neutral, PublicKeyToken=null

    ExceptionManager.AppDomainName: /LM/W3SVC/1/Root/OptionsDev-1-128146352329686480

    ExceptionManager.ThreadIdentity:

    ExceptionManager.WindowsIdentity: OPTIONS046\ASPNET

    1) Exception Information

    *********************************************

    Exception Type: System.TypeInitializationException

    TypeName: Microsoft.ApplicationBlocks.Cache.CacheService

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

    Data: System.Collections.ListDictionaryInternal

    TargetSite: Microsoft.ApplicationBlocks.Cache.CacheService GetCacheService()

    HelpLink: NULL

    Source: Microsoft.ApplicationBlocks.Cache

    StackTrace Information

    *********************************************

    at Microsoft.ApplicationBlocks.Cache.CacheService.GetCacheService()

    at Microsoft.ApplicationBlocks.Cache.CacheManager..ctor()

    2) Exception Information

    *********************************************

    Exception Type: 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 does not implement the 'IScavengingAlgorithm' interface.

    Data: System.Collections.ListDictionaryInternal

    TargetSite: Microsoft.ApplicationBlocks.Cache.IScavengingAlgorithm CreateInstance(Microsoft.ApplicationBlocks.Cache.CacheService, Microsoft.ApplicationBlocks.Cache.ICacheStorage, Microsoft.ApplicationBlocks.Cache.ICacheMetadata)

    HelpLink: NULL

    Source: Microsoft.ApplicationBlocks.Cache

    StackTrace Information

    *********************************************

    at Microsoft.ApplicationBlocks.Cache.ScavengingInfo.CreateInstance(CacheService cacheService, ICacheStorage cacheStorage, ICacheMetadata cacheMetadata)

    at Microsoft.ApplicationBlocks.Cache.CacheService..ctor()

    at Microsoft.ApplicationBlocks.Cache.CacheService..cctor()

    For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

     

     

    Tuesday, January 30, 2007 8:16 AM

All replies

  • User2123280694 posted

    Hello,

    We are having the same problem ?  If you have found the solution , could you please post it here ?

     

    regards

    Wednesday, February 7, 2007 3:17 PM
  • User2123280694 posted

     

    Hello,

    i found a solution for this problem using Enterprise library for frameWork 2.0 . If you still have the problem , download the Enterprise library for Framework 2.0  and the following references

    to all the projects that use caching.

    using Microsoft.Practices.EnterpriseLibrary.Caching;

    using Microsoft.Practices.EnterpriseLibrary.Caching.Configuration;

    using Microsoft.Practices.EnterpriseLibrary.Common;

    Instantiate the cachemanager object as follows,

    Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager _cacheManager = CacheFactory.GetCacheManager();

     

     Do the Following Steps .

    (Reference : http://www.devx.com/dotnet/Article/31158/1954?pf=true)

     

    1. Add a reference to the Microsoft.Practices.EnterpriseLibrary.Common.dll and Microsoft.Practices.EnterpriseLibrary.Caching.dll assemblies to your solution using the "Add Reference" option and navigating to the <Drive Name>:\Program Files\Microsoft Enterprise Library January 2006\bin folder on the drive where you installed the Enterprise Library. If you decide to use the database as a caching store, you also need to add a reference to the Data Access Block (the Microsoft.Practices.EnterpriseLibrary.Caching.Data.dll).
    2. Add the necessary configuration entries to the app.config or web.config file. To this end, you add the <configSections> element under the root <configuration> element.
               <configSections>
                 <section 
                  name="cachingConfiguration" 
                  type="Microsoft.Practices.
                    EnterpriseLibrary.Caching.Configuration.
                  CacheManagerSettings, 
                    Microsoft.Practices.EnterpriseLibrary.
                    Caching, Version=2.0.0.0,
                  Culture=neutral, 
                  PublicKeyToken=null"/>
               </configSections>
         
      
      1. Next, add the <cachingConfiguration> element directly under the root <configuration> element as shown below:
      1.          <cachingConfiguration

                defaultCacheManager="Default
                Cache Manager">
                <backingStores>
                 <add name="inMemory"     
                  type="Microsoft.Practices.
                    EnterpriseLibrary.Caching.
                    BackingStoreImplementations.
                  NullBackingStore,    
                  Microsoft.Practices.
                  EnterpriseLibrary.Caching" />
       
      Figure 1. Enterprise Library Configuration Tool: The figure shows the in-memory cache configuration settings.

               </backingStores>
               <cacheManagers>
                <add name="Default Cache Manager"
                 expirationPollFrequencyInSeconds = "60"
                 maximumElementsInCacheBeforeScavenging ="1000"          
                 numberToRemoveWhenScavenging="10"
                 backingStoreName="inMemory" />
               </cacheManagers>
              </cachingConfiguration>

    After These steps , Rebuild your solution and try deploying.

     

    This Solution worked for me . I hope it works for you.

    regards.

     

    Friday, February 9, 2007 11:41 AM
  • User2123280694 posted

     

    Hello,

    i found a solution for this problem using Enterprise library for frameWork 2.0 . If you still have the problem , download the Enterprise library for Framework 2.0  and the following references

    to all the projects that use caching.

    using Microsoft.Practices.EnterpriseLibrary.Caching;

    using Microsoft.Practices.EnterpriseLibrary.Caching.Configuration;

    using Microsoft.Practices.EnterpriseLibrary.Common;

    Instantiate the cachemanager object as follows,

    Microsoft.Practices.EnterpriseLibrary.Caching.CacheManager _cacheManager = CacheFactory.GetCacheManager();

     

     Do the Following Steps .

    (Reference : http://www.devx.com/dotnet/Article/31158/1954?pf=true)

     

    1. Add a reference to the Microsoft.Practices.EnterpriseLibrary.Common.dll and Microsoft.Practices.EnterpriseLibrary.Caching.dll assemblies to your solution using the "Add Reference" option and navigating to the <Drive Name>:\Program Files\Microsoft Enterprise Library January 2006\bin folder on the drive where you installed the Enterprise Library. If you decide to use the database as a caching store, you also need to add a reference to the Data Access Block (the Microsoft.Practices.EnterpriseLibrary.Caching.Data.dll).
    2. Add the necessary configuration entries to the app.config or web.config file. To this end, you add the <configSections> element under the root <configuration> element.
               <configSections>
                 <section 
                  name="cachingConfiguration" 
                  type="Microsoft.Practices.
                    EnterpriseLibrary.Caching.Configuration.
                  CacheManagerSettings, 
                    Microsoft.Practices.EnterpriseLibrary.
                    Caching, Version=2.0.0.0,
                  Culture=neutral, 
                  PublicKeyToken=null"/>
               </configSections>
         
      
      1. Next, add the <cachingConfiguration> element directly under the root <configuration> element as shown below:
      1.          <cachingConfiguration

                defaultCacheManager="Default
                Cache Manager">
                <backingStores>
                 <add name="inMemory"     
                  type="Microsoft.Practices.
                    EnterpriseLibrary.Caching.
                    BackingStoreImplementations.
                  NullBackingStore,    
                  Microsoft.Practices.
                  EnterpriseLibrary.Caching" />
       
      Figure 1. Enterprise Library Configuration Tool: The figure shows the in-memory cache configuration settings.

               </backingStores>
               <cacheManagers>
                <add name="Default Cache Manager"
                 expirationPollFrequencyInSeconds = "60"
                 maximumElementsInCacheBeforeScavenging ="1000"          
                 numberToRemoveWhenScavenging="10"
                 backingStoreName="inMemory" />
               </cacheManagers>
              </cachingConfiguration>

    After These steps , Rebuild your solution and try deploying.

     

    This Solution worked for me . I hope it works for you.

    regards.

     

    Friday, February 9, 2007 11:41 AM