创建和删除新站点后,无法停用站点模板(解决方案)

时间:2012-03-20 19:54:19

标签: sharepoint exception sharepoint-2010 sitetemplate

在SharePoint 2010中,我使用此模板从现有网站和新网站创建了新网站模板。删除新网站后,我无法停用网站模板以删除它。这是我得到的例外:

System.ArgumentException: Value does not fall within the expected range.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
Stack Trace: 
[ArgumentException: Value does not fall within the expected range.]
   Microsoft.SharePoint.SPWebCollection.get_Item(Guid id) +27763375
   Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId) +252
[SPFeatureIsOrphanedException: Unable to access web scoped feature (Id: 5c143ca0-e513-4fa5-93a6-a926352c982e) because it references a non-existent or broken web (Id: 196cdf6e-d4a1-4cb6-b962-591aaa3c5f43) on site 'http://win-9o8m2cks1v7'.  Exception: System.ArgumentException: Value does not fall within the expected range.
   at Microsoft.SharePoint.SPWebCollection.get_Item(Guid id)
   at Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId)]
   Microsoft.SharePoint.SPFeatureEnumeratorBase.GetCachedWeb(SPSite site, Guid webId, Guid featureId) +22713369
   Microsoft.SharePoint.SPFeatureEnumeratorBase.GetNextFeatureFromRowset(GetFeaturesState state, SqlDataReader reader, SPSite site) +464
   Microsoft.SharePoint.SPSiteFeatureEnumerator.System.Collections.IEnumerator.MoveNext() +38
   Microsoft.SharePoint.SPFeatureQueryResultCollection.System.Collections.IEnumerator.MoveNext() +26338677
   Microsoft.SharePoint.SPUserSolutionCollection.RemoveFeatureInstancesAndDefinition(SPFeatureDefinition featdef) +770
   Microsoft.SharePoint.SPUserSolutionCollection.Remove(SPUserSolution solution) +279
   Microsoft.SharePoint.WebControls.SolutionItemButton.DeactivateItem() +464
   Microsoft.SharePoint.WebControls.SPLinkButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +72
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +29
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2981

我已经清空了recyble bin。有谁知道如何停用和删除此网站模板?

2 个答案:

答案 0 :(得分:2)

你说你已经清空了回收站。你确定你已经清空了两个回收箱中的所有回收物品吗?如果没有,试试这个:

转到网站集的根网站的“网站设置”页面。在“网站集管理”标题下,单击“回收站”链接。在QuickLaunch菜单上,选择最终用户回收站项目,然后选择显示的所有项目,并单击项目列表顶部的删除选择链接。现在从QuickLaunch菜单中选择从最终用户回收站中删除并执行相同的操作。

现在返回解决方案库,您应该可以停用并删除解决方案。

答案 1 :(得分:0)

检查停用代码。在那里你有代码导致这个问题。 我建议启动功能页面,将visual studio连接到所有w3wp进程,并在功能停用时设置断点。这应该会告诉你出了什么问题。

我的猜测是你正在创建一个不再存在的web对象。