Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default .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

  2. Similar Questions and Discussions

    1. 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...
    2. 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...
    3. 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...
    4. 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...
    5. 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...
  3. #2

    Default .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

  4. #3

    Default 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

  5. #4

    Default Re: .NET Web Caching

    Thx Kevin! My application worked exactly the way you
    indicated.

    -Tim

    >-----Original Message-----
    >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
    >
    >
    >.
    >
    Tim Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139