![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Is anyone using Caching (HttpRuntime.Cache) in Whidbey? Not sure if there's another newsgroup for this though since it's still beta.... I'm having issues running a system built on 1.1 in a 2.0 environment... Simple (I think!!) use of the Cache as below, if (HttpRuntime.Cache[cacheKey] == null) { HttpRuntime.Cache.Add(cacheKey, new Hashtable(),null,DateTime.Now.AddMonths(1),TimeSpa n.Zero,System.Web.Caching. |
|
} userLookupTable = (Hashtable) HttpRuntime.Cache[cacheKey]; userKey = "User-" + username; if (userLookupTable[userKey] != null) //** { return (User) userLookupTable[userKey]; } And the system is crashing on the //** line with "Object reference not set to an instance of an object.". I would've thought that the check in the first line would capture if the Hashtable was null and instantiate it there! |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |