471,603 Members | 1,449 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,603 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 2501
> 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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Chan | last post: by
3 posts views Thread by Joseph | last post: by
3 posts views Thread by MattC | last post: by
12 posts views Thread by John M | last post: by
1 post views Thread by William Sullivan | last post: by
4 posts views Thread by ThatsIT.net.au | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by
reply views Thread by CCCYYYY | last post: by

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.