【发布时间】:2008-11-06 20:37:54
【问题描述】:
我们有一个自定义导航 Web 部件,它使用 MOSS 的 PortalSiteMapProvider 来构建菜单导航。 Provider 似乎没有管理它的对象。关于如何管理在 Provider 中创建的对象有什么想法吗?
它会导致这样的日志错误:
线程 1 上当前未释放的 SPRequest 对象 (9) 可能过多。确保正确处置此对象或其父对象(例如 SPWeb 或 SPSite)。此对象的分配 ID:{56D66DBA-AE72-42DF-A70F-B45E05A60A08} 当前分配的堆栈跟踪:
在 Microsoft.SharePoint.SPRequestManager.Add(SPRequest 请求,布尔可共享)
在 Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(布尔 bNotGlobalAdminCode,字符串 strUrl,布尔 bNotAddToContext,字节 [] UserToken,字符串用户名,布尔 bIgnoreTokenTimeout,布尔 bAsAnonymous)
在 Microsoft.SharePoint.SPWeb.InitializeSPRequest()
在 Microsoft.SharePoint.SPWeb.EnsureSPRequest()
在 Microsoft.SharePoint.SPWeb.get_Request()
在 Microsoft.SharePoint.SPWeb.InitWebPublic()
在 Microsoft.SharePoint.SPWeb.get_Exists()
在 Microsoft.SharePoint.Publishing.CachedObjectFactory.CreateWebFromUrl(字符串 url)
在 Microsoft.SharePoint.Publishing.Navigation.SPNavigationSiteMapNode..ctor(PortalWebSiteMapNode webNode、SPNavigationNode 节点、PortalSiteMapNode parentNode、NodeTypes 类型、字符串 url、字符串标题、字符串描述)
在 Microsoft.SharePoint.Publishing.Navigation.SPNavigationSiteMapNode.CreateSPNavigationSiteMapNode(PortalWebSiteMapNode webNode、SPNavigationNode 节点、PortalSiteMapNode 父节点)
在 Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMapNode.ProcessSPNavigationNode(SPNavigationNode 节点,SPNavigationNode previousSibling,PortalSiteMapNode parentNode)
在 Microsoft.SharePoint.Publishing.Navigation.PortalWebSiteMap.Node.PopulateNavigationChildren()
在 Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes includedTypes、NodeTypes includedHiddenTypes、OrderingMethod 排序、AutomaticSortingMethod 方法、布尔升序、Int32 lcid)
在 Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapNode.GetNavigationChildren(NodeTypes 包括HiddenTypes)
在 Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes(PortalSiteMapNode 节点,NodeTypes 包括HiddenTypes)
在 Microsoft.SharePoint.Publishing.Navigation.PortalSiteMapProvider.GetChildNodes(SiteMapNode 节点)
在 System.Web.SiteMapNode.get_ChildNodes()
在 Microsoft.SharePoint.Publishing.Navigation.PortalHierarchicalEnumerable.System.Collections.IEnumerable.GetEnumerator()
在 System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem 节点,IHierarchicalEnumerable 可枚举)
在 System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem 节点,IHierarchicalEnumerable 可枚举)
在 System.Web.UI.WebControls.Menu.DataBindItem(MenuItem 项)
在 System.Web.UI.WebControls.Menu.PerformDataBinding()
在 System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect()
在 System.Web.UI.WebControls.BaseDataBoundControl.DataBind()
在 System.Web.UI.WebControls.Menu.DataBind()
在 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound()
在 System.Web.UI.WebControls.Menu.EnsureDataBound()
在 System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e)
在 System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e,布尔 registerScript)
在 System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e)
在 Microsoft.SharePoint.WebControls.AspMenu.OnPreRender(EventArgs e)
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Control.PreRenderRecursiveInternal()
在 System.Web.UI.Page.ProcessRequestMain(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest(布尔 includeStagesBeforeAsyncPoint,布尔 includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext 上下文)
在 System.Web.UI.Page.ProcessRequest(HttpContext 上下文) 在 ASP.VIEWPAGE_ASPX_2077083467.ProcessRequest(HttpContext 上下文)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep 步骤,Boolean& completedSynchronously)
在 System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(异常错误)
在 System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpCont
【问题讨论】:
标签: sharepoint navigation portalsitemapprovider