我``使我的web部件运行良好(我可以将其添加到页面并使用它)。但是,如果我想将其移动到其他区域或修改该页面上的任何其他Web部件,我会得到一个异常。可以添加我的自定义web部件,但无法修改任何webpart页面
关于什么可能是错误的任何想法?
也许它必须做一些事情,我的web部件有一个空区变量?但是webpart在页面上显示效果良好。下面的细节。
编辑:啊,不,我看到其他(原始的)web部件的Zone变量也是空的。无论如何,我不知道如何甚至digg和找出问题。
Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
Exception Details: Microsoft.SharePoint.WebPartPages.WebPartPageUserException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
Stack Trace:
[WebPartPageUserException: Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))]
Microsoft.SharePoint.WebPartPages.SPWebPartManager.SaveSomeChanges(SPLayoutProperties layoutProperties) +897
Microsoft.SharePoint.WebPartPages.WebPart.SaveSomeChanges(SPLayoutProperties layoutProperties) +52
Microsoft.SharePoint.WebPartPages.SPWebPartManager.WPSaveSomeChanges(SPLayoutProperties layoutProperties) +83
Microsoft.SharePoint.WebPartPages.SPWebPartManager.ApplyChangeList(String changeString) +865
Microsoft.SharePoint.WebPartPages.SPWebPartManager.OnLoad(EventArgs e) +398
System.Web.UI.Control.LoadRecursive() +50
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Control.LoadRecursive() +141
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
解决方案处于第一个链接。 我正在使用一个函数,我通过SPWeb对象作为参数,并在它的末尾,我处置。注释掉web.Dispose(),它工作。 – 2009-07-02 10:18:57
酷,而要记住的要点是SPContext.Current.Web不属于你,所以永远不要处置它。 – Kusek 2009-07-02 11:44:30