473,395 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Using Cache methods in dll

Shall i use Cache class and its methods for creating c# dll file.
i tried to access insert and get methods of Cache ,but i couldn't get
it ,even i imported System.Web.Caching .
i am getting
An object reference is required for the nonstatic field, method, or
property 'System.Web.Caching.Cache.Get(string)'

error while debugging
if anyone knows.plz give me the answer

Feb 15 '06 #1
2 2551
> Shall i use Cache class and its methods for creating c# dll file.
i tried to access insert and get methods of Cache ,but i couldn't get
it ,even i imported System.Web.Caching .
i am getting
An object reference is required for the nonstatic field, method, or
property 'System.Web.Caching.Cache.Get(string)'

error while debugging
if anyone knows.plz give me the answer


You can access the Cache through System.Web.HttpRuntime.Cache

Hans Kesting
Feb 15 '06 #2
Are you going to use this DLL in a non-web application? If so, you
might want to check out the Caching application block in the Enterprise
Application Blocks. It would be much more appropriate.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

<g_*******@hotmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
Shall i use Cache class and its methods for creating c# dll file.
i tried to access insert and get methods of Cache ,but i couldn't get
it ,even i imported System.Web.Caching .
i am getting
An object reference is required for the nonstatic field, method, or
property 'System.Web.Caching.Cache.Get(string)'

error while debugging
if anyone knows.plz give me the answer

Feb 15 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: FS Liu | last post by:
Hi, I am writing ATL Service application (XML Web service) in VS.NET C++. Are there any sample programs that accept XML as input and XML as output in the web service? Thank you very much.
3
by: Chan | last post by:
Got in a difficult situation of storing and retrieving TextReader in Cache, but found no such post yet. Tried to store a textreader into Cache object in a similar way illustrated in .NET's SDK...
3
by: Joseph | last post by:
Has anyone implement a mechanism to retain the cache up to a minimum cache time even though it is supposed to get invalidated? I asked this because I don't want to increase the load on the...
3
by: MattC | last post by:
Hi, I am persisting the viewstate for each page into the Cache object, below is shown my methods for saving and loading: I am able to save the viewstate to the cache and most times I can load...
12
by: John M | last post by:
Hello, On Microsoft Visual Studio .NET 2003, I want to use some global elements, that can be used in each one of my pages. i.e I put a oleDBConnection on global.asax.vb How can I use it...
1
by: William Sullivan | last post by:
I'm trying to nail down some issues with the cache in my application. Currently, I have an object that stands between my business logic and database logic called CacheLogic (cute, no?). ...
15
by: Joe Fallon | last post by:
I would like to know how you can figure out how much memory a given instance of a class is using. For example, if I load a collection class with 10 items it might use 1KB, and if I load it with...
5
by: ggk517 | last post by:
We are trying to develop an Engineering application using PHP, Javascript with Informix as the back-end. Is it possible to retrieve data using Javascript but by accessing the Database. Say...
4
by: ThatsIT.net.au | last post by:
There are a few different ways to use cache in Asp.net. What I want to know is what is the scope of these cache methods. what I mean by scope is are are they cached for the one user or not. if...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.