这是场景:

我们在服务器上运行了一个ASP.NET供电的内容管理系统,该系统由第三方构建,因此不幸的是必须将其视为“黑匣子”。我对它的工作方式不太了解。它的Windows 2008带有IIS 7。

几周内它会正常工作,然后突然间,每当有人试图访问页面时,它将开始返回此.NET解析器错误:

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately. 

Parser Error Message: Cannot execute a program. The command being executed was
 "C:\Windows\Microsoft.NET\Framework\v2.0.50727\vbc.exe" /noconfig
   @"C:\Windows\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\7082fc73\4a06ea64\iscamrh7.cmdline".

Source Error: 
Line 69:     <!--<%@ Register Src="/web/ContentLibrary/Section/section125.ascx" TagName="section125" TagPrefix="uc1" %><uc1:section125 ID="section125" runat="server" />-->
Line 70:     <%If useAltStyles Then %>
Line 71:      <%@ Register Src="/web/Tags/tag46.ascx" TagName="tag46_14" TagPrefix="uc14" %><uc14:tag46_14 ID="tag46_14" runat="server" />
Line 72:     <%Else %>
Line 73:      <%@ Register Src="/web/Tags/tag41.ascx" TagName="tag41_16" TagPrefix="uc16" %><uc16:tag41_16 ID="tag41_16" runat="server" />

该消息提到它“无法执行” VBC.EXE,我知道这与编译ASPX页面有关。从其引用的源线来看,它发生在尝试 @Register 页面上的自定义控件。

有人对可能导致的原因有任何提示或直觉吗?例如,当服务器资源较低时发生的事情是吗?

有帮助吗?

解决方案

为了将来参考,由于网站所使用的COM组件中的内存泄漏,事实证明是内存短缺。

在应用程序池回收设置上设置内存限制被证明是临时修复程序,直到存储器泄漏被排序为止。

其他提示

我不知道以下内容是由复制/粘贴引起的还是由异常消息截断,但是当我在新页面中复制您的aspx代码时,我首先会遇到一个编译时间错误,即我的“如果必须终止”,则结束如果“但是我看不出这可能导致您收到的消息。 (使用ASP.NET开发服务器测试,vs2010在ASP.NET 2.0 Web项目中进行测试)

令我震惊的第二件事是那条线

<!--<%@ Register Src="/web/ContentLibrary/Section/section125.ascx" TagName="section125" TagPrefix="uc1" %><uc1:section125 ID="section125" runat="server" />-->

尽管评论仍然需要第125.ASCX控制。可能是该误差是在e节125.ASCX控件内生成的。

您可以尝试删除注释的@register语句吗?

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top