Ask a Question related to ASP.NET General, Design and Development.
-
Tim #1
.NET Web Caching
Are there any additional IIS 5.0 settings that need to be
configured to get caching to work on a web server. I have
a .NET web application and I'm trying to cache some
DataSets.
~Tim
Tim Guest
-
Caching in FMS 2.0.4
Hi, We have set up FMS 2.0.4 and want to find out if caching capability is available in FMS and information regarding cache settings. Please let... -
web svc caching
We are about to deploy our newly developed web svc, but since our svr is a laptop with limited resource and limited bandwidth, I guess I'll use a... -
Caching
I have a page were data can be filtered using up to 4 listboxes. Once someone does a filter, those parameters are saved so when they come back to... -
FM caching
Hi All, On Windows, does anyone know how to manipulate where FM caches? Our Windows network is setup to only allow a 30mg roaming profile... -
ASP Caching
Hello, I have a simple web form page in which I insert/update data to a database. The SQL code to insert data is written in a server side submit... -
Tim #2
.NET Web Caching
I'm building a .NET C# web application using web caching.
The Cache class only works when I'm using an aspx page. I
want this Caching logic to be in its own class file (.cs)
in another project so other developers can use it too.
I'm instaintiating the Cache class like this but the
methods do not work like this.
Cache webCache = new Cache();
webCache.Add(.......)
Does web caching have to happen in aspx pages only?
-Tim
Tim Guest
-
Kevin Spencer #3
Re: .NET Web Caching
First of all, Tim, you don't want to create a new Cache object; it already
exists in the Application. When you reference an object from the HttpContext
of a Page from a class that doesn't derive from Page, you can grab it from
the HttpContext under which the class operates (which is from inside a
Page). Example:
System.Web.Caching.Cache myCache = System.Web.HttpContext.Current.Cache;
myCache.Add(...);
--
HTH,
Kevin Spencer
Microsoft MVP
..Net Developer
[url]http://www.takempis.com[/url]
Complex things are made up of
lots of simple things.
"Tim" <tim.boyer@bankofamerica.com> wrote in message
news:005701c35c39$49b9caf0$a401280a@phx.gbl...> I'm building a .NET C# web application using web caching.
> The Cache class only works when I'm using an aspx page. I
> want this Caching logic to be in its own class file (.cs)
> in another project so other developers can use it too.
> I'm instaintiating the Cache class like this but the
> methods do not work like this.
>
> Cache webCache = new Cache();
> webCache.Add(.......)
>
> Does web caching have to happen in aspx pages only?
>
> -Tim
Kevin Spencer Guest
-
Tim #4
Re: .NET Web Caching
Thx Kevin! My application worked exactly the way you
indicated.
-Tim
object; it already>-----Original Message-----
>First of all, Tim, you don't want to create a new Cachefrom the HttpContext>exists in the Application. When you reference an objectcan grab it from>of a Page from a class that doesn't derive from Page, youfrom inside a>the HttpContext under which the class operates (which isSystem.Web.HttpContext.Current.Cache;>Page). Example:
>
>System.Web.Caching.Cache myCache =caching.>myCache.Add(...);
>
>--
>HTH,
>
>Kevin Spencer
>Microsoft MVP
>..Net Developer
>[url]http://www.takempis.com[/url]
>Complex things are made up of
>lots of simple things.
>
>"Tim" <tim.boyer@bankofamerica.com> wrote in message
>news:005701c35c39$49b9caf0$a401280a@phx.gbl...>> I'm building a .NET C# web application using webpage. I>> The Cache class only works when I'm using an aspx(.cs)>> want this Caching logic to be in its own class file>>> in another project so other developers can use it too.
>> I'm instaintiating the Cache class like this but the
>> methods do not work like this.
>>
>> Cache webCache = new Cache();
>> webCache.Add(.......)
>>
>> Does web caching have to happen in aspx pages only?
>>
>> -Tim
>
>.
>Tim Guest



Reply With Quote

