Server Fault Asked on December 5, 2021
I have an application running in IIS via an ISAPI extension with outputs JSON files based on the input URL (it works with a RESTful interface – the URLs are of the form http://domain/path/to/resource.json
).
The application works well but I am unable to get IIS Output Caching working for the files I am generating.
In my web.config I have:
<system.webServer>
...
<caching>
<profiles>
<add extension=".json" policy="CacheForTimePeriod" kernelCachePolicy="DontCache" duration="00:00:30" />
</profiles>
</caching>
</system.webServer>
I’ve also tried using *
but that doesn’t work either.
Any ideas why this would not work? Thanks!
By default, caching is disabled on ISAPI filters, and I don't believe it can be enabled through the GUI. Install the ISAPI filter and enable the caching feature by modifying the <isapiFilters>
section of the web.config or by utilizing appcmd.exe
.
appcmd.exe Example:
appcmd.exe set config -section:system.webServer/isapiFilters /+"[name='YourJsonIsapi',path='c:yourpathYourJsonIsapi.dll',enabled='True',enableCache='True']" /commit:apphost
web.config Example:
<configuration>
<system.webServer>
<isapiFilters>
<filter
name="YourJsonIsapi"
enabled="true"
enableCache="true"
path="C:yourpathYourJsonIsapi.dll" />
</isapiFilters>
</system.webServer>
</configuration>
Answered by Doug Luxem on December 5, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP