We are excited to announce that the IIS.NET Forums are moving to the new Microsoft Q&A experience. Learn more >

IIS not running modified classic ASP pagesRSS

1 reply

Last post Oct 30, 2020 02:28 AM by Brucz

  • IIS not running modified classic ASP pages

    Oct 29, 2020 05:15 PM|DMc66|LINK

    It seems that for the last few days IIS 10 on our Windows 2016 web server is not serving modified classic ASP pages, it seems to always load from a cache.

    I rebooted the machine earlier today and it was fine for a short period after that but now it's always running the saved version and not the file I'm changing. I have even tried to remove the file, access it to get 404, and put the file back - still runs the old version.

    I've tried setting the ASP Caching parameters in IIS to FALSE for Enable Type Library caching and 0 for all of the files to cache... not change.

    We have not installed any updates for the last couple of weeks so that cannot be the cause.

    I have also tried adding the various response headers that can prevent caching but no change. Since it does not seem to be reading the modified file it's not paying any attention to those settings.

    Advice / help anyone?

  • Re: IIS not running modified classic ASP pages

    Oct 30, 2020 02:28 AM|Brucz|LINK

    Hi DMc66,

    What you can set in IIS is disable all cache in Output Caching module.

    Uncheck all cache to prevent IIS cache. Then you need to disable cache in client, here are some code sample.

    <%..
    Response.expires= 0
    Response.Expires=-1
    Response.Expiresabsolute = Now() - 1
    Response.AddHeader "cache-control","private"
    Response.CacheControl = "no-cache"
    %>
    <meta http-equiv="PRAGMA" value="NO-CACHE">
    <meta http-equiv="Expires" content="Mon, 01 Jan 1990 12:00:00 GMT">

    One of the best ways to suppress cache is to redirect to another page with  a querystring at the end of the url like:

    response.redirect "mynocachepage.asp?"

    Also, please don’t forget to request the application using the incognito mode of your browser

    Best Regards,

    Brucz

    .NET forums are moving to a new home on Microsoft Q&A, we encourage you to go to Microsoft Q&A for .NET for posting new questions and get involved today.