在 SharePoint 2010 中编辑几个页面后,我收到此错误。我必须在两个前端执行 IISReset 才能解决此问题。我不知道如何修复它,甚至不知道这里还能提供什么,但请告诉我,因为现在重置每天都会发生几次。
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 1/26/2011 11:12:48 AM
Event ID: 1309
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: PINTSPSFE02.samcstl.org
Description:
Event code: 3005 Event message: An unhandled exception has occurred. Event time: 1/26/2011 11:12:48 AM Event time (UTC): 1/26/2011 5:12:48 PM Event ID: c52fb336b7f147a3913fff3617a99d57 Event sequence: 4965 Event occurrence: 2178 Event detail code: 0 Application information: Application domain: /LM/W3SVC/1449762715/ROOT-2-129405348166941887 Trust level: WSS_Minimal Application Virtual Path: / Application Path: C:\inetpub\wwwroot\wss\VirtualDirectories\80\ Machine name: PINTSPSFE02 Process information: Process ID: 5928 Process name: w3wp.exe Account name: SAMC\MossAppPool Exception information: Exception type: AccessViolationException Exception message: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. Request information: Request URL: http://mosscluster/Pages/Home.aspx Request path: /Pages/Home.aspx User host address: 10.3.60.26 User: SAMC\BARNMD Is authenticated: True Authentication Type: NTLM Thread account name: SAMC\MossAppPool Thread information: Thread ID: 110 Thread account name: SAMC\MossAppPool Is impersonating: False Stack trace: at Microsoft.Office.Server.ObjectCache.SPCache.MossObjectCache_Tracked.Delete(String key, Boolean recursive, DeletionReason reason)
at Microsoft.Office.Server.ObjectCache.SPCache.MossObjectCache_Tracked.Get(String key)
at Microsoft.Office.Server.ObjectCache.SPCache.Get(String objectTypeName, String id)
at Microsoft.Office.Server.Administration.UserProfileServiceProxy.GetPartitionPropertiesCache(Guid applicationID)
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PartitionPropertiesCache()
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.DataCache.get_PartitionProperties()
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.GetMySitePortalUrl(SPUrlZone zone, Guid partitionID)
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.GetMySitePortalUrl(SPUrlZone zone, SPServiceContext serviceContext)
at Microsoft.Office.Server.WebControls.MyLinksRibbon.EnsureMySiteUrls()
at Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalMySiteUrlAvailable()
at Microsoft.Office.Server.WebControls.MyLinksRibbon.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details:
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="32768">1309</EventID>
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2011-01-26T17:12:48.000000000Z" />
<EventRecordID>35834</EventRecordID>
<Channel>Application</Channel>
<Computer>PINTSPSFE02.samcstl.org</Computer>
<Security />
</System>
<EventData>
<Data>3005</Data>
<Data>An unhandled exception has occurred.</Data>
<Data>1/26/2011 11:12:48 AM</Data>
<Data>1/26/2011 5:12:48 PM</Data>
<Data>c52fb336b7f147a3913fff3617a99d57</Data>
<Data>4965</Data>
<Data>2178</Data>
<Data>0</Data>
<Data>/LM/W3SVC/1449762715/ROOT-2-129405348166941887</Data>
<Data>WSS_Minimal</Data>
<Data>/</Data>
<Data>C:\inetpub\wwwroot\wss\VirtualDirectories\80\</Data>
<Data>PINTSPSFE02</Data>
<Data>
</Data>
<Data>5928</Data>
<Data>w3wp.exe</Data>
<Data>SAMC\MossAppPool</Data>
<Data>AccessViolationException</Data>
<Data></Data>
<Data>http://mosscluster/Pages/Home.aspx</Data>
<Data>/Pages/Home.aspx</Data>
<Data>10.3.60.26</Data>
<Data>SAMC\BARNMD</Data>
<Data>True</Data>
<Data>NTLM</Data>
<Data>SAMC\MossAppPool</Data>
<Data>110</Data>
<Data>SAMC\MossAppPool</Data>
<Data>False</Data>
<Data> at Microsoft.Office.Server.ObjectCache.SPCache.MossObjectCache_Tracked.Delete(String key, Boolean recursive, DeletionReason reason)
at Microsoft.Office.Server.ObjectCache.SPCache.MossObjectCache_Tracked.Get(String key)
at Microsoft.Office.Server.ObjectCache.SPCache.Get(String objectTypeName, String id)
at Microsoft.Office.Server.Administration.UserProfileServiceProxy.GetPartitionPropertiesCache(Guid applicationID)
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.get_PartitionPropertiesCache()
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.DataCache.get_PartitionProperties()
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.GetMySitePortalUrl(SPUrlZone zone, Guid partitionID)
at Microsoft.Office.Server.Administration.UserProfileApplicationProxy.GetMySitePortalUrl(SPUrlZone zone, SPServiceContext serviceContext)
at Microsoft.Office.Server.WebControls.MyLinksRibbon.EnsureMySiteUrls()
at Microsoft.Office.Server.WebControls.MyLinksRibbon.get_PortalMySiteUrlAvailable()
at Microsoft.Office.Server.WebControls.MyLinksRibbon.OnLoad(EventArgs e)
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Control.LoadRecursive()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
</Data>
</EventData>
</Event>
答案1
如果您的服务器上没有足够的内存或运行了太多应用程序,则可能会发生这种情况。回收应用程序池以消除错误或配置应用程序池以更频繁地回收或限制应用程序池的内存限制。
答案2
我遇到此错误的经历是,在一个 .NET 可执行文件中,我快速、连续地自动执行文档 (Excel/Word)。它会运行一周而没有问题,然后有一天决定抛出此错误。我只需监视错误发生的时间,然后重置应用程序即可解决此问题。然后它又运行了几周而没有问题。
这肯定是与前一个请求中对象/内存的处理有关。在下一个 API 访问发生之前,有些东西挂起、干扰或重叠,导致它们没有得到正确的处理/释放。不幸的是,我无法指出原因。我按照 Microsoft 的建议处理 Office API,甚至在每次请求后进行垃圾收集。有一次,错误开始频繁发生,我不得不重新安装 Office,而神奇的是,错误又恢复为零星错误,而不是持续错误。因此,这让我得出结论,根本原因是 Office API 中存在问题和/或我使用它的方式。
您的情况听起来很相似,因为您说“几次之后”,但可能不是第一次编辑。我也在很多安装过此应用的机器上都出现过这种情况,无论有没有 ECC,错误都会持续存在,内存测试总是正常。
微软确实表示我不应该像现在这样使用办公自动化,但由于我的应用程序的要求和这种自动化的其他选项太昂贵,我真的别无选择。所以我只能尽我所能地绕过错误进行编码。希望我的经验能对这个问题的根源提供一点启发。
这里也有一个人遇到类似的错误,其原因是第三方 DLL。 https://stackoverflow.com/questions/4074585/attempted-to-read-or-write-protected-memory-this-is-often-an-indication-that-ot 但错误本身很普通,他并没有干扰 Office API。
答案3
下载内存测试 ISO,将其刻录到 CD,重新启动服务器并让 memtest 运行一整夜。这将有效地测试您的内存,并告诉您是否有损坏的内存。除此之外……我不确定。