尝试使用已不复存在的对象

时间:2014-06-21 22:26:49

标签: sharepoint sharepoint-2013

我有1个网站集,其下面有4个子网站,所有4个子网站都有相同的主页,页面布局和主页面以及网页部分(带列表),我不断收到此错误

  

尝试使用已不复存在的对象。 (例外   HRESULT:0x80030102(STG_E_REVERTED

以下是堆栈跟踪:

  

Microsoft.SharePoint.Library.SPRequestInternalClass.LocalizeText(字符串   bstrToLocalize,UInt32 lcid,String bstrDefaultResourceFile,Boolean   fIsXml)+0
  Microsoft.SharePoint.Library.SPRequest.LocalizeText(字符串   bstrToLocalize,UInt32 lcid,String bstrDefaultResourceFile,Boolean   fIsXml)+258

     
    

[SPException:尝试使用已不复存在的对象。     (HRESULT异常:0x80030102(STG_E_REVERTED))]
    Microsoft.SharePoint.SPGlobal.HandleComException(COMException comEx)     +146 Microsoft.SharePoint.Library.SPRequest.LocalizeText(String bstrToLocalize,UInt32 lcid,String bstrDefaultResourceFile,Boolean     fIsXml)+786
    Microsoft.SharePoint.Utilities.SPUtility.GetLocalizedString(字符串     source,String defaultResourceFile,UInt32 language)+85
    DMA.Internet.Common.Helper.GetResourceValue(String resourceKey)+161
    DMA.Internet.WebParts.MunicipalElectronicServices.MunicipalElectronicServices.Page_Load(对象     sender,EventArgs e)+464 System.Web.UI.Control.LoadRecursive()+95     System.Web.UI.Control.LoadRecursive()+190
    System.Web.UI.Control.LoadRecursive()+190
    System.Web.UI.Control.LoadRecursive()+190
    System.Web.UI.Control.LoadRecursive()+190
    System.Web.UI.Control.LoadRecursive()+190
    System.Web.UI.Page.ProcessRequestMain(布尔     includeStagesBeforeAsyncPoint,Boolean includeStagesAfterAsyncPoint)     2936

  

这是我的尝试:

1- double检查了我的代码是否有任何不正确的SP对象处理,例如SPContext.Current.SiteSPContext.Current.Web但是一切看起来都很好(没有处理前面提到的对象)

2-将我的资源文件复制到App_globalResources并使用HttpContext.GetGlobalResourceObject代替SPUtility.GetLocalizedString但没有运气

注意:我使用的一些Web部件使用自定义字段类型(基本类型布尔值),如果我删除此Web部件主页工作

1 个答案:

答案 0 :(得分:2)

它已经解决,在Helper.GetResourceValue()级别抛出异常是一种奇怪的行为,但是,我正在调用一个方法,在设置ExpandRecurrence = true;和{{RowLimit = 1;时从Sharepoint事件日历中提取事件1}},所以只需删除RowLimit=1;即可解决问题。

相关问题