p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


Go Back   p2p.wrox.com Forums > ASP.NET and ASP > ASP.NET 2.0 > BOOK: ASP.NET 2.0 MVP Hacks and Tips
I forgot my password Register Now
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 MVP Hacks and Tips
This is the forum to discuss the Wrox book ASP.NET 2.0 MVP Hacks and Tips by David Yack, Joe Mayo, Scott Hanselman, Fredrik Normén, Dan Wahlin, J. Ambrose Little, Jonathan Goodyear; ISBN: 9780764597664

Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 MVP Hacks and Tips section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.

Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 7th, 2007, 02:35 PM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to netstruc65
Default Chapter 10 - Viewing the ASP.NET Cache

I'm trying to implement a cache viewer based on some of your code samples from the chapter. In the GetCache method I get a runtime exception of null reference from the following code.

            FieldInfo fieldCacheInt = currentContext.Cache.GetType().GetField("_cacheInt ernal",
                BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField);

            object cacheInt = fieldCacheInt.GetValue(currentContext.Cache);

************************************************** ****************
field entries is always null
************************************************** ****************
FieldInfo fieldEntries = cacheInt.GetType().GetField("_entries",
                            BindingFlags.NonPublic | BindingFlags.Instance);

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

            Hashtable hashEntries = fieldEntries.GetValue(cacheInt) as Hashtable;
            Hashtable hashCopy = new Hashtable(hashEntries.Count);


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Reddit!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Viewing HTML in ASP.NET 2.0 rgturner ASP.NET 2.0 Professional 11 September 9th, 2007 11:04 PM
ASP.NET Crystal Report 10.2 jayamohan4u ASP.NET 2.0 Basics 0 February 13th, 2007 07:20 AM
Ch 10 - Viewing asp.net cache hugomon BOOK: ASP.NET 2.0 MVP Hacks and Tips 0 October 11th, 2006 07:48 PM
Using Windows Media Player 10 in ASP.Net 1.1 pritambaldota ASP.NET 1.0 and 1.1 Professional 3 August 16th, 2006 01:13 AM
profesional ASP 3.0 chapter 10 ADO paging josephine_aeiou All Other Wrox Books 2 February 22nd, 2005 02:58 AM



All times are GMT -4. The time now is 11:49 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© 2008 Wiley Publishing, Inc