PTa*_*sey 11 .net vb.net asp.net iis visual-studio-2013
我有一个很大的(对我来说)ASP.NET(4.5框架)应用程序,在VS2012开发和发布时工作正常.
我已经从VS2012升级到VS2013,我没有问题就打开了解决方案,它在本地运行正常(在IIS Express上).
我不知道这是不是红鲱鱼,但我第一次使用NuGet来更新AJAX Control Toolkit(及其依赖项),它似乎有效.
当我将网站发布(文件系统发布)到我们的Web服务器(Windows Server 2012中的IIS 8)时,它会加载<compilation defaultLanguage="vb" debug="true" targetFramework="4.5">到我改为的UNTIL debug="false".
当我这样做时,该网站像猪一样运行,有时页面甚至没有加载,并且它的IIS工作进程占用CPU并保持不变,以百分比增长直到它消耗掉所有的CPU.
编辑:这发生在服务器和我的电脑上(IIS Express)
此测试站点的AppPool运行时与我们的实时站点的AppPool具有相同的设置.值得注意的是
我希望你需要更多的信息,但老实说,我不知道从哪里开始,我不想用不必要的细节来压倒.
先感谢您
编辑:我真的应该提到这一点:
该网站是在发布模式下发布期间预编译的.在过去发布之前,我从未在开发环境中更改为debug = false.
我为我的解决方案中的每个项目都得到了这个:
(0,0): warning : The following assembly has dependencies on a version of the .NET Framework that is higher than the target and might not load correctly during runtime causing a failure: [projectname], Version=1.0.0.0, Culture=neutral, PublicKeyToken=null. The dependencies are: Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. You should either ensure that the dependent assembly is correct for the target framework, or ensure that the target framework you are addressing is that of the dependent assembly.
编辑:看来我继承的这个解决方案是一个网站SITE而不是APP.我不知道是否会发挥作用.
我最终不得不打电话给微软.他们使用ProdDump和LogMan来分析发生了什么.不到24小时就回到我身边说:
"线程19似乎非常糟糕地阻塞了CPU.堆栈的顶部表明AjaxMin试图在Dictionary对象上执行FindEntry,这是从AjaxControlToolKit触发的,特别是在任何一个上都定义了"CombineScripts"属性Master页面或OrderDetails.aspx的设计页面.基本上,它结合了所有JS文件并缩小它们.
快速测试是从AjaxControlToolKit禁用CombineScript的逻辑,看看是否能提高性能"
谷歌告诉我CombineScripts是的属性ToolkitScriptManager和AJAX以来一直是个犯罪嫌疑人(没有真正好的理由,只是一种预感),我就跃升.
果然,更改我对ToolkitScriptManager的引用以包含CombineScripts ="false"完全解决了问题!
<ajaxToolkit:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" CombineScripts="false" ScriptMode="Release" />
Run Code Online (Sandbox Code Playgroud)
相关文章:我不是唯一一个:https://www.google.ca/#q=ToolkitScriptManager+combinescripts+problem
两篇有用的帖子:http : //forums.asp.net/t/1696523.aspx http://ajaxcontroltoolkit.codeplex.com/workitem/27558