Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/35.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net ScriptManager.axd将不会缓存_Asp.net_Asp.net Ajax_Scriptmanager - Fatal编程技术网

Asp.net ScriptManager.axd将不会缓存

Asp.net ScriptManager.axd将不会缓存,asp.net,asp.net-ajax,scriptmanager,Asp.net,Asp.net Ajax,Scriptmanager,好吧,这让我发疯了。我已经搜索了几个小时,尝试了几乎所有的方法,但是使用ScriptManager.axd下载的脚本不会缓存。它们总是以expires=-1标记为无缓存 我在下面的链接上发布了这篇文章,但没有一篇有效 我尝试过的一些事情: 1) 在web.config中设置compilation debug=“false” <system.web.extensions > <scripting > <scriptResourceHandler enableComp

好吧,这让我发疯了。我已经搜索了几个小时,尝试了几乎所有的方法,但是使用ScriptManager.axd下载的脚本不会缓存。它们总是以expires=-1标记为无缓存

我在下面的链接上发布了这篇文章,但没有一篇有效

我尝试过的一些事情:

1) 在web.config中设置compilation debug=“false”

<system.web.extensions >
<scripting >
<scriptResourceHandler enableCompression=“true” enableCaching=“true”/ >
</scripting >
</system.web.extensions >
2) 添加了一个HTTP处理程序,该处理程序搜索ScriptManager.axd,然后设置头。此处对此进行了描述:。实际上,我在http处理程序中设置了一个断点&确认它被命中了,但是你猜怎么着?我为ScriptResource.axd设置的标题都没有出现在响应中

3) 已将此部分添加到web.config

<system.web.extensions >
<scripting >
<scriptResourceHandler enableCompression=“true” enableCaching=“true”/ >
</scripting >
</system.web.extensions >

4) 在machine.config中设置此属性

<configuration >
<system.web >
<deployment retail="true" />
</system.web >
</configuration >

5) 在ScriptManager标记中设置ScriptMode=“Release”


说真的,有什么好处?为什么这么难?脚本经理就是那样吗?我错过了什么明显的东西吗?为什么我在HTTP处理程序中设置的响应属性没有在响应中结束?

检查应用程序池管道模式。 此外,您的项目中可能有一些Global.asax文件可以覆盖缓存头设置