CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > starter_kits_and_source_projects.microsoft_application_blocks Tags:
Item Type: NewsGroup Date Entered: 11/26/2007 6:58:52 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 5 Views: 60 Favorited: 0 Favorite
6 Items, 1 Pages 1 |< << Go >> >|
misuk11
Asp.Net User
caching problem11/26/2007 6:58:52 PM

0

Im trying to implement caching using the enterprise library and am having a problem with this line

CacheManager cacheManager = CacheFactory.GetCacheManager();

 

when the code tries to execute I get this error

Object reference not set to an instance of an object

 

I thought that the default cache manager should be returned ?  In every example Ive seen for this, the first line of code is always included, yet I always get an error

Can anyone tell me what im doing wrong ?

misuk11
Asp.Net User
Re: caching problem11/27/2007 11:07:50 AM

0

has anyone actually managed to get this to work ??  Ive tried everything, followed many examples, they all create the CacheManager in the same way

CacheManager cacheManager = CacheFactory.GetCacheManager();

 

It never works for me, Ive used the enterprise configuration tool to modify my app.config file, included the correct assemblies, but I always get the Object reference error

misuk11
Asp.Net User
Re: caching problem11/27/2007 3:29:56 PM

0

ok, I guess no one can help me on this one, but here goes one last time.

Could the problem be related to the config files.  My data access layer (which is where i put the class contining the caching code)  has an app.config file.  When I run my web app, using the config manager I read the connection string infornmation from the web.config file NOT the app.config file./  So I assumed that any cache related settings should reside in the web.config file.  Using the enterprise library configuration manager tool, I added the code necessary, these lines were added

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />

 

Ive noticed other section that already existed in the web.config file have

PublicKeyToken=31bf3856ad364e35

even changing the new lines to match made no difference (why are they different anyway ?)

 

now when i run my app, at the point of connectiong to the database I get this error

An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data The located assembly's manifest definition does not match the assembly reference

 this is now going from bad to worse.  All versions of 'Microsoft.Practices.EnterpriseLibrary.Data are the same  3.1.0.0

Am I on the right track for using caching in my app (ie plaing the code in the web.config file, not the app.config file)  And why am I now getting this mismatch error.  I hope someone can help, I spent over a day trying to solve this problem, I thought it was meant to be straightforward ????

sjd0103
Asp.Net User
Re: caching problem12/14/2007 2:45:34 PM

0

I'm having nearly the same problem.  I have one Solution with 2 projects.  One project is a Class Library in which I have an App.Config that evidently is irrelevant.  The second project is a Web application that references the .dll (output) of the first project (the Class Library). I call into my Class Library from my Web app.  I have a breakpoint in the Class Library where the NullReferenceException is being thrown.  While still debugging I can see that in the CacheFactory.GetCacheManager(); , the Factory's ConfigurationSource is set to the Web.Config of the calling Web app. I'm still researching, but any help would be appreciated.
misuk11
Asp.Net User
Re: caching problem12/14/2007 3:26:25 PM

0

I managed to resolve my problem eventually, see my post here http://forums.asp.net/t/1182019.aspx  it may help you.  You need to have a section in the web.config inside the web app for caching to work

<section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

<section name="cachingConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Caching.Configuration.CacheManagerSettings, Microsoft.Practices.EnterpriseLibrary.Caching, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

 

sjd0103
Asp.Net User
Re: caching problem12/14/2007 3:42:35 PM

0

Thanks misuk11...I have an AppDomain problem and need to go back to the drawing board.

I want my Class Library to be self contained and use caching (via Ent Lib), which seems to be impossible.  The CacheFactory always reverts to the AppDomain of the referencing app...which makes sense, but then my .dll is no longer self contained </loop>.

6 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
The Book of JavaScript: A Practical Guide to Interactive Web Pages Authors: Thau, Pages: 490, Published: 2007
Information Brokering Across Heterogeneous Digital Data: A Metadata-based Approach Authors: Vipul Kashyap, Amit Sheth, Pages: 224, Published: 2000
Field-programmable Logic and Applications: 11th International Conference, FPL 2001, Belfast, Northern Ireland, UK, August 27-29, 2001 : Proceedings Authors: Gordon Brebner, Roger Woods, Pages: 665, Published: 2001
Algorithms - ESA 2001: 9th Annual European Symposium: Proceedings Authors: ESA '2001, European Symposium on Algorithms, Friedhelm Meyer auf der Heide, 2001 ESA 9, Århus, Pages: 0, Published: 2001
Design and Application of Hybrid Intelligent Systems Authors: Ajith Abraham, Mario Köppen, Katrin Franke, Pages: 1137, Published: 2004
Webmaster's Guide to the Wireless Internet Authors: Ryan Fife, Wei Meng Lee, Pages: 0, Published: 2001
Algorithms - ESA 2000: 8th Annual European Symposium, Saarbrücken, Germany, September 5-8, 2000 : Proceedings Authors: Michael S. Paterson, Pages: 450, Published: 2000
Proceedings of the Ninth Annual Ace-Siam Symposium on Discrete Algorithms: proceedings Authors: Howard Karloff, Pages: 704, Published: 1998
Computing and Combinatorics: 5th Annual International Conference, COCOON '99, Tokyo, Japan, July 26-28, 1999 : Proceedings Authors: Takao Asano, Hiroshi Imai, D. T. Lee, Shin-Ichi Nakano, Takeshi Tokuyama, Pages: 494, Published: 1627

Web:
Forum OpenACS Q&A: Browser caching problem I only recently installed the second site and they have been having lots of weird problems, most of which appear to me to be caching type ...
Forum OpenACS Q&A: MS Proxy Server and Caching Problem with ... Forum OpenACS Q&A: MS Proxy Server and Caching Problem with OpenACS 4.2 Web Site ... We are suspecting a cache problem. ...
[no subject] - Swivel Help | Google Groups Google Groups Home · Help | Sign in · Swivel Help · Home · Discussions · + new post · Pages · Files · About this group · Join this group ...
Milonic: JavaScript & DHTML Systems » Blog Archive » Page Caching ... Jun 26, 2008 ... Page Caching Problem. Had a user today complain about a custom menu not displaying correctly when a page had been redrawn. ...
» Caching problem - FreshPorts News Caching problem. I know we have a caching problem. I suspect I know the cause. The symptoms of the problem are:. a commit has been processed by the system. ...
Is this a caching problem? | drupal.org Is this a caching problem? Post installation · Drupal 5.x · gavacho - October 20 , 2008 - 07:38. I am trying to change the text strings on the e-commerce ...
Twitter cache refresh bug fix Apr 22, 2008 ... This will fix your update problem and you can see all the latest updates refreshed automatically everytime, as the cache gets refreshed. ...
Troubleshooting File Caching Problems (IIS 6.0) Usually non-Windows-powered Network Attached Storage (NAS) vendors provide fixes for known problems; however, as a workaround, caching is typically disabled ...
DNS caching problem - Dev Shed DNS caching problem- DNS. Visit Dev Shed to discuss DNS caching problem.
Page Replacement for General Caching Problems - Albers, Arora ... Caching paging is a well studied problem in online algorithms, usually studied under the assumption that all pages have a uniform size and a uniform fault ...

Videos:
Halo 3 Problem | HELP? UPUPDATE:I found out that if I load the maps on KnightxofxLight and then hop offline, then online and switch to NightxofxLight, I can play 1 round of...
(Problems With Herbalife) WARNING!! **FORBIDDEN SECRETS** To Success!! http://www.CreatorstoWealth.com Charlie Deleon Guerrero problems with herbalife (problems with herbalife) "problems with herbalife" problemswithherba...
Quixtar Problems - Are You Safe? I Wonder... http://www.showmefreedom.info Eric Binnion (940) 228-4613 quixtar problems quixtar problems quixtar problems typical Quixtar Amway Deceptions I...
Problem installing OpenSolaris 10 It gets just beyond probing hardware, and then reboots for seemingly no reason. Here are my specs: Jeantech Titan midi tower case Corsair HX520W PSU...
Icenrye's Geocaching Videozine - Episode 30 Shot in the new "studio" this episode looks a "Armchair Caching". These are virtual caches that can be "found" from your computer with a bit of re...
OCIN06: On-Die Interconnects for Next Generation CMPs - Partha Kundu, Intel With ever-increasing transistors enabled by silicon technology, many computationally intensive problems are within reach of a single chip or small fo...
Psptube 20070812 beta http://www.psp-hacks.com/2007/08/12/psptube-20070812-beta-updated 0812 version - planned -added movie download feature downloads movies to favorite...
(Ecoquest Legal Problems) You Will *FAIL* Without This! http://www.CreatorstoWealth.com Charlie Deleon Guerrero Ecoquest Legal Problems (Ecoquest Legal Problems) "Ecoquest Legal Problems" EcoquestLegalProb...
Problem with my computer(Blue Screen Of Death) So this is what is says : A problem has been detected and windows has been shut down to prevent damage to your computer. PAGE_FAULT_IN_NONPAGED_AR...
131-Advanced DBA Hands-On #05 (Tuning)-Measuring the Buffer Cache Hit Ratio As a DBA, you are responsible for monitoring and calculating the Buffer Cache Hit Ratio in the SGA memory in case of performance problems. Your job's...












problem with exception & logging application block

email tradelistener encodes message body?

daab cofigration setup qeustion

anyone know how to use the ms exception blocks?

problem accessing help file of enterprise library - january 2006

is updater block deprecated?

open excel file using daabaf (daab v3)

data migration from cryptography application block 1.1

a cached shopping cart ??

exception handling application block

daab - c# datetime parameter intto a smalldatetime field in the database conversion error

close connection using executedataset

enterprise library data access and oracle output parameter

newbie - problem finding application blocks dll

active directory using enterprise library

page reference in custom iexceptionhandler

microsoft.applicationblocks.exceptionmanagement and caching

throwing exception

problem installing rohservice.exe

configurationmanager

security problem

is following true or false?

eventlog error!

logging application block (entlib 2.0) - unable to write to event log with asp.net

the value of the property 'type' cannot be parsed.

file dependency implementation

data block

why sqlhelper didn't has a close method

beginner question - where in the web.config to put the connection string?

deploying exception handling block (enterprise library)

 
Search This Site:

 
  Privacy | Contact Us
All Times Are GMT