XML Caching in Classic ASP on IIS 6.0

Discussion in 'ASP General' started by TechNeck, Feb 2, 2006.

  1. TechNeck

    TechNeck Guest

    We have a website that reads data from Oracle and creates an XML file. Then
    the site uses that file to access the info faster. On IIS5 we have no
    problems, but on IIS6 we seem to have some caching issuses. This deals with
    the Worker Processes. By default, there is only 1 Worker Process that gets
    recycled after 1700 minutes or so. The problem is, that we will select some
    data from the screen, which opens up another window to update the info. We
    walk through the update process and change some data and it updates the page
    fine. We can even check the XML file and it is changed, but if you choose to
    go back into that data, the dropdowns will reflect whatever was initially in
    the XML not the changes. If I increase the number of Worker Processes and
    shorten their recycle time, this doesn't seem to be a problem, but for every
    request I am generating a 25M file on the server that eventually gets
    recycled. I don't want to load up the memory with useless files, but I want
    our application to reflect the correct data. I really need to do this without
    affecting any other possible web apps that may be on the box. Any advice?
    TechNeck, Feb 2, 2006
    #1
    1. Advertising

  2. It's unclear from your post whether the file is being sent to the client or
    is held only by the server to help build pages it supplies to the client.

    It does sound like there is either a change in what the browser believes it
    can re-use from the local cache or there is something that IIS 6 believes is
    static content that Http.sys is serving itself from a cache it maintains.

    If using IE6 have you tried Ctrl+F5, does that get fresh data OR if another
    client visits the affected page do they see out-of-date information?

    Anthony.
    Anthony Jones, Feb 4, 2006
    #2
    1. Advertising

  3. TechNeck

    TechNeck Guest

    The file is actually being sent to the client and is stored in the temporary
    Internet Files. I tried using Ctrl+F5 but I got the same results.

    The initial web page launches another window which then cycles through 5
    different windows loading data from the XML file each time. On the first pass
    everything works great, but on the second and subsequent passes, I see the
    same exact data as the first time I made the changes.

    Any recommendations?

    Jared

    "Anthony Jones" wrote:

    > It's unclear from your post whether the file is being sent to the client or
    > is held only by the server to help build pages it supplies to the client.
    >
    > It does sound like there is either a change in what the browser believes it
    > can re-use from the local cache or there is something that IIS 6 believes is
    > static content that Http.sys is serving itself from a cache it maintains.
    >
    > If using IE6 have you tried Ctrl+F5, does that get fresh data OR if another
    > client visits the affected page do they see out-of-date information?
    >
    > Anthony.
    >
    >
    >
    TechNeck, Feb 6, 2006
    #3
  4. If you navigate to the XML file directly in the browser does the xml file
    retrieved show old or new data?

    If not, what happens if you Ctrl+F5 now, is is updated?
    Anthony Jones, Feb 7, 2006
    #4
  5. TechNeck

    TechNeck Guest

    OK, I went into the app, changed an item, then went back in and it was still
    defaulting to the original. So I changed the URL to point to the XML file on
    the server where it wrote the changes and it displays the old data. I press
    Ctrl+F5 and it changes to the new data.

    Jared

    "Anthony Jones" wrote:

    > If you navigate to the XML file directly in the browser does the xml file
    > retrieved show old or new data?
    >
    > If not, what happens if you Ctrl+F5 now, is is updated?
    >
    >
    >
    >
    >
    TechNeck, Feb 7, 2006
    #5
  6. Then the XML file is being cached somewhere.

    Have you enabled content expiration on the file and set it to expire
    immediately?

    XML is treated as static content.

    Anthony.
    Anthony Jones, Feb 7, 2006
    #6
  7. TechNeck

    TechNeck Guest

    I have enabled content expiration on all three virtual directories that it
    gets information from and even did the same for the Default Web Site, but I
    still get the same response.

    Jared

    "Anthony Jones" wrote:

    > Then the XML file is being cached somewhere.
    >
    > Have you enabled content expiration on the file and set it to expire
    > immediately?
    >
    > XML is treated as static content.
    >
    > Anthony.
    >
    >
    >
    TechNeck, Feb 7, 2006
    #7
  8. Hmm... sounds like an IE 'optimisation' to me.

    You could try this albeit a bit of a kuldge:-

    Change all references to the XML file to:-

    /yourPath/youFile.xml?ver=<%=Application("XMLVersion")%>

    Where in your code you modify the XML file add:-

    Application("XMLVersion") = Application("XMLVersion") + 1
    Anthony Jones, Feb 8, 2006
    #8
  9. "TechNeck" <_Spam> wrote in message
    news:D...
    >I have enabled content expiration on all three virtual directories that it
    > gets information from and even did the same for the Default Web Site, but
    > I
    > still get the same response.
    >
    > Jared
    >
    > "Anthony Jones" wrote:
    >
    >> Then the XML file is being cached somewhere.
    >>
    >> Have you enabled content expiration on the file and set it to expire
    >> immediately?
    >>
    >> XML is treated as static content.


    I had a similar problem, fixed with cache control headers:

    Response.CacheControl = "no-cache"
    Response.AddHeader "Pragma", "no-cache"
    Response.Expires = -1


    -Mark





    >> Anthony.
    >>
    >>
    >>
    Mark J. McGinty, Feb 22, 2006
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ansuman Bebarta

    Classic asp registered with python in IIS 7

    Ansuman Bebarta, Feb 2, 2011, in forum: Python
    Replies:
    0
    Views:
    580
    Ansuman Bebarta
    Feb 2, 2011
  2. spinkysam

    IIS 5.1 on XP Pro cannot serve ASP classic

    spinkysam, May 30, 2006, in forum: ASP General
    Replies:
    12
    Views:
    285
    Mike Brind
    May 30, 2006
  3. Guest
    Replies:
    1
    Views:
    216
    Hossam Salah
    Sep 24, 2006
  4. Newbie

    ASP Classic problems on LAN IIS install

    Newbie, Dec 1, 2006, in forum: ASP General
    Replies:
    3
    Views:
    198
    Anthony Jones
    Dec 1, 2006
  5. anon

    Classic ASP and IIS 6.0

    anon, Jan 31, 2007, in forum: ASP General
    Replies:
    2
    Views:
    200
Loading...

Share This Page