« Previous Next »

Thread: dll being cached by IIS

Last post 09-05-2008 5:49 AM by WenJun Zhang - MSFT. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 08-29-2008, 1:44 PM

    dll being cached by IIS

    Hello,

    I have already posed this question elsewhere and AnilR does not seem to be able to answer my question.  I was hoping someone could.

    My question is a rarely discussed topic.  It involves dll's in the GAC that the IIS caches.  The problem is this:  with IIS 5.1, I can turn off the caching of the .dll by IIS 5.1, (which only returns a hard coded string), by executing this line from the command prompt: "cscript.exe adsutil.vbs set w3svc/1/root/myWebApp/cacheisapi 0" (without quotes).

    If I do this, and "reset" IIS 5.1, I have the ability to replace the same .dll with the same name, version and build over and over.  The only difference would be that the .dll would return different hard coded string.  By this I mean that the calling web application would then retrieve a different string after calling the funtion within the .dll.  This works fine.

    If I go and rebuild the .dll to return a different hard coded string and then replace it again in the GAC and then call the same web app, ("without" reseting IIS), the web app will get the new string too.  But this only works if "cacheisapi" in above command is turned off.  If I don't turn the "cacheisapi" off, then the IIS 5.1 caches the .dll.  This prevents the calling web application from retrieving the correct string, even though the .dll has been modified and readded to the GAC.  This is because the IIS is referring to the IIS cache.

    The question is, how to replicate the same line:  "cscript.exe adsutil.vbs set w3svc/1/root/myWebApp/cacheisapi 0" (without quotes), for IIS 7.  This line does not seem to have an effect on the IIS 7?

    Please help.

    Thanks, theadmirableone

     

  • 09-05-2008, 5:49 AM In reply to

    Re: dll being cached by IIS

    Hi,

    IIS 7.0 no longer uses metabase so the adsutil.vbs script will not work. I'm not aware a supported way to disable in memory caching of ISAPI on IIS7. What I can suggest is recycling your app's application pool with something like appcmd on IIS7. This may address your goal to clear up the cache.

    Thanks.

    WenJun Zhang - MSFT
    Sincerely
    Microsoft Online Community Support

    “Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ”
Page 1 of 1 (2 items)
Microsoft Communities