ASP.NET:vbc.exe 的解析器错误消息

发布于 2024-09-08 00:47:06 字数 1433 浏览 8 评论 0原文

场景如下:

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

几周后它会正常工作,然后突然之间,每当有人尝试访问页面时,它就会开始返回此 .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自定义控件时,就会发生这种情况。

有谁对可能造成这种情况的原因有任何暗示或预感吗?例如,当服务器资源不足时会发生这种情况吗?

Here's the scenario:

We have an ASP.NET powered Content Management System running on a server, which is built by a third-party and so unfortunately has to be considered a 'black box' for the purposes of this question. I don't know much about how it works. Its Windows 2008 with IIS 7.

For weeks it will work fine, and then suddenly it will start returning this .NET Parser Error whenever anyone tries to access a page:

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" />

The message mentions that it 'cannot execute' vbc.exe, which I know is involved with compiling aspx pages.
And from the source lines it quotes, it happens when its trying to @Register custom controls on a page.

Does anyone have any hints or hunches on what might be causing this? E.g. is it the sort of thing that happens when the server is low on resources?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

执手闯天涯 2024-09-15 00:47:06

为了供将来参考,事实证明,由于该站点使用的 COM 组件中存在内存泄漏,导致内存不足。

事实证明,在应用程序池回收设置上设置内存限制是一个临时解决方案,直到内存泄漏得到解决为止。

For future reference, it turned out the be a memory shortage due to a memory leak in a COM component the site was using.

Setting a memory limit on the Application Pool recycle settings proved to be a temporary fix until the memory leak gets sorted.

别把无礼当个性 2024-09-15 00:47:06

我不知道以下内容是由复制/粘贴引起还是由异常消息截断,但是当我将您的 aspx 代码复制粘贴到新页面中时,我首先收到编译时错误,我的“If”必须由“终止” End If”,但我不明白这会如何导致您收到该消息。 (在 ASP.NET 2.0 Web 项目中使用 ASP.NET 开发服务器、VS2010 进行测试)

第二件事让我印象深刻的是行

虽然注释仍然需要section125 .ascx 控件存在。难道是section125.ascx控件内部产生了错误。

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

I don't know if the following is caused by copy/paste or truncated by the exception message but when I copy paste your aspx code in a new page I first get a compile time error that my "If" has to be terminated by "End If" but I don't see how this could cause the message you get. (tested with ASP.NET Development Server, VS2010 in ASP.NET 2.0 web project)

The second thing that strikes me is that the line

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

although commented still needs the section125.ascx control to exist. Could it be that the error is generated inside the section125.ascx control.

Can you try to remove the commented @Register statement?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文