COM preSS和缩减大小的WebResource.axd和中的ScriptResource.axd ASP.NET 4的WebForms [英] Compress and Minify WebResource.axd and ScriptResource.axd in ASP.NET 4 WebForms
问题描述
我一直在尝试了一个星期,现在减少对我们的Web应用程序的请求的数量,但我似乎无法在个.axd
合并文件。我从什么地方建议其工作本地(开发箱),但在我们的测试和生产环境不工作,因为他们都在 HTTPS
。开发商没有对此发表评论,他写道:最后在2011年更新组件(我会找到的链接和更新这个帖子)。
I have been trying for a week now to reduce the number of requests on our web application but I can't seem to combine the .axd
files. I got a suggestion from somewhere which worked locally (development box) but doesn't work on our test and production environment as they are both on HTTPS
. The developer didn't comment on that and the component he wrote was last updated in 2011. (I will find the link and update this post).
我的ScriptManager
尝试使用 CompositeScript
,再次它不测试/生产环境中工作。
I tried using the CompositeScript
in ScriptManager
and again it doesn't work on Test/Production environments.
我以前SquishIt来解决其他文件。 (见附件)
I used SquishIt to resolve the other files. (see attachment)
推荐答案
要迫使它在你的环境中工作,设置的 ScriptMode =发布
例如为:
To force it work on your environment, set ScriptMode="Release"
eg as:
<asp:ScriptManager ID="ScrMang" runat="server" ScriptMode="Release" >
<CompositeScript>
<Scripts>
<asp:ScriptReference name="MicrosoftAjax.js"/>
<asp:ScriptReference name="MicrosoftAjaxWebForms.js"/>
<asp:ScriptReference name="Common.Common.js" assembly="AjaxControlToolkit"/>
</Scripts>
</CompositeScript>
</asp:ScriptManager>
一些较笔记
要找到里面的 CompositeScript
添加什么脚本可以使用code从这里:的 HTTP://aspnet.$c$cplex.com/releases/view/13356 并获得更多的帮助如何从该页面使用它:< A HREF =HTTPS://lancezhang.word$p$pss.com/2008/11/15/aspnet-ajax-performance/相对=nofollow> HTTPS://lancezhang.word$p$pss.com / 2008/11/15 / ASPNET-AJAX性能/
Some more notes
To find what scripts to add inside CompositeScript
you can use the code from here : http://aspnet.codeplex.com/releases/view/13356 and get more help how to use it from this page : https://lancezhang.wordpress.com/2008/11/15/aspnet-ajax-performance/
这篇关于COM preSS和缩减大小的WebResource.axd和中的ScriptResource.axd ASP.NET 4的WebForms的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!