惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
Visual Studio Blog
爱范儿
爱范儿
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
雷峰网
雷峰网
V
V2EX
博客园_首页
Engineering at Meta
Engineering at Meta
博客园 - 聂微东
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
H
Help Net Security
A
About on SuperTechFans
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Blog — PlanetScale
Blog — PlanetScale
W
WeLiveSecurity
云风的 BLOG
云风的 BLOG
D
Docker
Security Archives - TechRepublic
Security Archives - TechRepublic
Help Net Security
Help Net Security
N
News and Events Feed by Topic
Simon Willison's Weblog
Simon Willison's Weblog
G
Google Developers Blog
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
博客园 - 叶小钗
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
博客园 - 三生石上(FineUI控件)
aimingoo的专栏
aimingoo的专栏
Hacker News: Ask HN
Hacker News: Ask HN
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 司徒正美
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
T
Troy Hunt's Blog
T
Tenable Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recorded Future
Recorded Future
F
Fortinet All Blogs
D
DataBreaches.Net
B
Blog
T
Threat Research - Cisco Blogs
MyScale Blog
MyScale Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
The GitHub Blog
The GitHub Blog
Security Latest
Security Latest
M
MIT News - Artificial intelligence

博客园 - Sunmoonfire

SharePoint 2013无代码实现列表视图的时间段动态筛选 SharePoint 2013:自定义ECB菜单项的添加 SharePoint Foundation 2013 with SP1 在SharePoint列表中使用自增栏 SharePoint 2010自定义母版页小技巧——JavaScript和CSS引用 修改SharePoint列表项显示“新”图标的天数 通过PowerShell实现SharePoint列表增删改 在SharePoint 2010页面中嵌入SWF文件 在LINQ to SharePoint中使用创建时间,创建者,修改时间,修改者 SharePoint 2010之LINQ与SPMetal 修改SharePoint页面上的控件数量的限制 SharePoint 2010:部署.resx(资源)文件到App_GlobalResources的简单方法 在SharePoint 2010中使用jQuery 在SharePoint 2010环境下区分w3wp进程 打SharePoint 2010 SP1后访问用户配置文件同步服务应用程序出错的解决办法 使用[本人]创建视图筛选时的一个问题和解答 SharePoint 2010开发工具图解系列:Visual Studio 2010创建事件接收器 SharePoint 2010开发工具图解系列:Visual Studio 2010创建列表 SharePoint 2010开发工具图解系列:Visual Studio 2010 SharePoint Tool入门
"缺少服务器端相关性"的内容定位
Sunmoonfire · 2012-05-04 · via 博客园 - Sunmoonfire

SharePoint 运行状况分析器已检测到一些值得关注的关键问题。其中一条为:

作为管理员,我如何能知道哪些地方用到了这个WebPart呢? Google搜索到2条很有用的途径。

1、通过stsadm来查找webpart的引用状况。

stsadm -o enumallwebs -includewebparts >c:\temp\somelog.txt

在返回的xml结果中,可以看到每个web下的webpart节点。

<Databases>
  <Database 。。。>
    <Site Id="76754f86-f517-4d46-8331-58378678401f" 。。。>
      <Webs Count="50">
        <Web Id="ef027756-f112-4765-a5b8-d5a13c1b7417" Url="/" LanguageId="2052" TemplateName="STS#0" TemplateId="1">
          <WebParts>
            <WebPart Id="baf5274e-a800-8dc3-96d0-0003d9405663" Count="20" Status="Missing SafeControls entry" Type="Microsoft.SharePoint.WebPartPages.ListViewWebPart" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
            <WebPart 。。。。
          </WebParts>
        </Web>
。。。

从中就可以找到一些错误的原因。即使出现在藏的很深的一个子网站里,都可以找到。

2、直接通过数据库来查找。用来检查错误的timerjob实际上在对应的内容数据库上运行了一个这样的查询:

SELECT tp_WebPartTypeId, COUNT(1), tp_Assembly, tp_Class
FROM AllWebParts (NOLOCK)
WHERE tp_WebPartTypeId IS NOT NULL GROUP BY tp_WebPartTypeId, tp_Assembly, tp_Class

通过错误信息提供给我们的WebPartTypeId,进行如下的查询:

SELECT *
FROM AllWebParts
WHERE tp_WebPartTypeId = 'b82a8e9d-8706-3252-0a3b-ba19bf65e250'

 结果中,找到了我要的SiteId。

该表还有一些其他的信息,可供我们排错。常用的几个表以及关系如下:

SELECT Webs.FullUrl, Webs.Title, AllDocs.DirName, AllDocs.LeafName

FROM AllDocs, Sites, AllWebParts, Webs

WHERE Webs.Id = Sites.RootWebId AND AllDocs.Id = AllWebParts.tp_PageUrlID

 AND Sites.Id = AllDocs.SiteId

参考资料

Missing Server Side Dependencies - 8d6034c4-a416-e535-281a-6b714894e1aa

How to find missing web part?