Sharepoint学习笔记—习题系列--70-576习题解析 -(Q147-Q151)
Question 147
Your company has an existing SharePoint 2010 public-facing Web site. The Web site runs on multiple loadbalanced Web front-ends. Your company recently changed its name. You are asked to design a plan to update the Web site content to reflect the company name change. You need to accomplish this with a minimum amount of developer hours and minimum impact on users. Which approach should you recommend?
A. Create a Power Shell script to iterate through the site content and make the updates as needed.
B. Create a custom delegate control with the new company name and copy it to the \14\Config directory of all Web front-end servers. Perform an IISReset on each Web front-end server.
C. Create a custom application page with the new company name and copy it to the _layouts directory of all Web front-end servers.
D. Add a property in the web.config file to store the company name. Then update the master pages and page layouts to return the name from that property.
解析:
你公司有一个Sharepoint2010公共网站,此网站采用了若干个负载均衡的WFE服务器。你公司现在更改了公司名称,因此,你需要采用尽可能少的开发以及减少尽可能有的冲击来完成对网站内涉及到公司名称的内容的更改。你该如何操作呢?
我们知道,只要重启了IIS,那么Sharepoint网站就会暂时停运,用户就会访问不到Sharepoint网站,这样的冲击肯定不是本题所要的。而选项B与选项D均需要重启IIS。其中选项D虽然是修改了Web.config文件,但我们知道,要想使此文件的修改生效,往往就需要重启IIS。所以选项B.D可以直接排除。
而选项C则试图通过创建一个新应用程序页面来解决本题的问题,这显然是两码事,本题主要是想要你修改已经存在的网站内容,而非使用新的公司名称创建新内容。所以选项C也应被排除。
选项A,可以通过PowerShell代码段来遍历Sharepoint内对象并作相应的更改,又不用重启IIS。
因此本题答案应该选 A
参考
http://msdn.microsoft.com/en-us/library/ee536539(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/aa979592(v=office.14).aspx
Question 148
You have a public-facing SharePoint 2010 site. The site resides on two Web front-ends that are not load balanced. You are asked to design an update for a Web Part to the site. The update requires modifications to the code in the global assembly cache (GAC). You need to design the update with minimal impact to users who are accessing the site. Which approach should you recommend?
A. Deploy the update directly to the GAC. Perform an IISReset on each Web front-end.
B. Deploy the update directly to the GAC. Recycle the application pool for the SharePoint site on each Web frontend.
C. Deploy the update within a custom Microsoft Windows Installer package that copies the code into the GAC and performs an IISReset on each Web front-end.
D. Deploy the update in a SharePoint solution file.
解析:
你公司有一个Sharepoint2010公共网站,此网站运行在两台未采用负载均衡的WFE服务器上。你现在需要升级网站内的某个Web Part,此升级涉及到对部署在GAC内的某个程序集代码的修改,并要求尽量减少对网站的冲击,你该如何操作呢?
我们知道:负载均衡建立在现有网络结构之上,在负载均衡的思路下,多台服务器为对称方式,每台服务器都具有同等的地位,可以单独对外提供服务而无须其他服务器的辅助。通过负载分担技术,将外部发送来的请求按一定规则分配到对称结构中的某一台服务器上,而接收到请求的服务器都独立回应客户机的请求。通过应用负载均衡技术,使应用服务超过了一台服务器只能为有限用户提供服务的限制,可以利用多台服务器同时为大量用户提供服务。当某台服务器出现故障时,负载均衡服务器会自动进行检测并停止将服务请求分发至该服务器,而由其他工作正常的服务器继续提供服务,从而保证了服务的可靠性。【也就是说,这里所描述的情况在本题就无法产生作用了,我们必须要人为介入去降低Web Part的升级对各个WFE服务器的冲击】
首先,如果采用IISReset的操作,那么就会造成整个Sharepoint网站停止服务。这是因为,IISReset会强制停止所有的进程并重新启动它们,通过这种方式以保证所有的更改都在重新启动后生效。当然,这种冲击是最大的,所以可以直接排除选项A.C。
至于应用程序池回收(Recycle the application pool),我们知道应用程序池是将一个或多个应用程序链接到一个或多个工作进程集合的配置。因为应用程序池中的应用程序与其他应用程序被工作进程边界分隔,所以某个应用程序池中的应用程序不会受到其他应用程序池中应用程序所产生的问题的影响。Sharepoint网站是基于Web Application的,而Web Application是运行在Application Pool的。如果回收程序池,系统就会开启一个新的进程,而新版本的DLLs就会从GAC中重新加载【针对本题就意味着新版本的Web Part的程序集重新加载】。 所以,选项B是本题正解。
至于选项D.开发并部署Sharepoint解决方案。我们知道,这种方法也会重新启动IIS,所以也被排除。下面是Sharepoint场解决方案部署步骤的详细信息:
服务器场解决方案的部署步骤将创建一个计时器作业。此计时器作业由服务器场中的每台 Web 服务器上的计时器服务使用。此计时器作业还使用 SharePoint Foundation 管理 Web 服务来访问相应权限以将解决方案文件部署到每台计算机,因此所有服务器上必须同时运行这两项服务,部署才能成功。首先,分析包清单以查找程序集、应用程序页、JavaScript 以及其他不属于功能的文件。将这些项复制到清单中指定的位置。将功能中包含的所有文件复制到 Feature 目录(%ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\FEATURES 的子目录)。在将解决方案文件复制到目标计算机后,将为所有前端 Web 服务器安排配置重置;之后,重置过程将部署文件并重新启动 Microsoft Internet Information Services (IIS)【此处是相关描述】。服务器场管理员可指定执行此操作的时间。最后,注册服务器场解决方案功能,并将架构和定义文件提交到配置存储区。
因此本题答案应该选 B
参考
http://www.51testing.com/?uid-43726-action-viewspace-itemid-92693
http://blogs.msdn.com/b/dtaylor/archive/2011/02/23/sharepoint-2010-service-application-load-balancer.aspx
http://msdn.microsoft.com/zh-cn/library/ms525803(v=vs.90).aspx
http://msdn.microsoft.com/zh-cn/library/aa544500(office.14).aspx
Question 149
You have multiple SharePoint 2010 sites based on the same site definition. You need to plan a strategy to update the property value for a Web Part specified in the site definition for all existing sites. You must accomplish this with a minimum of developer hours. Which strategy should you recommend?
A. Update the site definition to specify the new property for the Web Part and deploy it through a feature to each of the sites.
B. Create a delegate control with the updated value and deploy it through a feature to each of the sites.
C. Copy an update to the Web Part into the global assembly cache (GAC) and perform an IISReset.
D. Use a Power Shell script to iterate through the sites and update the property.
解析:
你基于某个网站定义创建了若干个Sharepoint网站,你现在想要对网站定义内的某个Web Part的属性值进行更改,并将此更改应用到所有的相关网站,要求尽量少的开发工作,你该如何操作呢?
首先,我们知道,如果根据网站定义创建了网站,你通常就不能再通过修改网站定义来更改那些已经创建的网站了。Sharepoint提供了Feature Stapling来在不修改原有网站定义的情况下对已存在的网站进行功能扩充,但通过此方式就需要创建项目并进行开发了。然而由于本题仅涉及Web Part的属性更改,没涉及其功能的升级,所以我们就可以借助PowerShell来做到这点。下面是样例代码:
$site = Get-SPSite "SiteCollectionURL"
$webcoll = $site.AllWebs
#Step through each web in site collection
foreach ($web in $webcoll) {
#Get the root folder
$folder = $web.RootFolder
#Get the welcome page
$welcomepage = $folder.WelcomePage
$file = $web.GetFile("$welcomepage")
$file.CheckOut()
$wpm = $web.GetLimitedWebPartManager("$welcomepage", [System.Web.UI.WebControls.WebParts.PersonalizationScope]::Shared)
foreach($webpart in $wpm.WebParts){
if($webpart.MyUniqueProperty){
if(!$webpart. MyUniqueProperty){
$webpart. MyUniqueProperty = $ MyUniquePropertyValue(Value which need to be Set/Update)
$wpm.SaveChanges($webpart)
}#First If
}#Second If
}#Foreach
$file.CheckIn("Updated/Set property of webpart",1)
$file.Publish("Updated/Set property of webpart")
$site.Dispose()
}#foreach
所以,选项D是本题的正解。
选项A.重新升级网站定义。这方法我们在前面已经予以了否定。
选项B.创建Delegate Control作用不到你自行开发的Web Part部件,更别说还需要代码开发了。
选项C.通过代码升级Web Part是需要创建解决方案并部署的,不能直接采取像本选项这样的操作,而且仅仅更改Web Part的属性似乎用不着那么大的动静。
因此本题答案应该选 D
参考
http://msdn.microsoft.com/zh-cn/library/ms463169(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/bb861862(v=office.12).aspx
Question 150
You have an existing SharePoint 2010 solution consisting of custom Web Parts deployed to the global assembly cache (GAC). The signing key used for the Web Parts has recently changed. You need to design an update to the Web Parts without any change to the value settings of their properties. Which approach should you recommend?
A. Deploy the changes within a SharePoint solution.
B. Copy the changes directly to the GAC and perform an IISReset.
C. Programmatically copy the information from the existing Web Parts to their new versions and then remove the old instances.
D. Update the Web Parts through the Web Part gallery and select the Overwrite if file already exists check box.
解析:
你有一个Sharepoint2010解决方案,此方案包含一些部署在GAC中的Web Part,现在,这些Web Parts的signing key发生了改变,你需要升级这些Web Parts而无需通过改变它们的属性做到这点,你该如何操作呢?
我们已经知道,WebPart就是组成网页(Web)的部件(Part),它是SharePoint站点WebPartPage的基本构建块。在SharePoint网站的页面上,数据的显示、数据的编辑,都是通过一个一个的WebPart来完成的;实质上,WebPart是ASP.NET自定义控件,都是由一个WebPart说明文件(.dwp)和WebPart程序集(.dll)组成。
由于本题已经指出: “此方案包含一些部署在GAC中的Web Part,现在,这些Web Parts的程序集签名(signing key)发生了改变”。也就是说,此时的Web Part程序集已经不再是原来的程序集了,你实质上是新建了一个程序集来升级你的Web Part。而题目要求你: “你需要升级这些Web Parts而无需通过改变它们的属性做到这点”, 我们知道,在Web Part的.webpart文件中定义了其相关的属性信息,所以,我们就需要把这些信息拷贝到新的WebPart项目中来。
做完上述工作并部署了新的Web Part程序集后,你会发现,Sharepoint系统仍旧使用的是旧的Web Part,你并未升级它们。这是因为,这种操作并不是某种意味上的”升级”。由于使用了新的签名的程序集,老的程序集仍然存在,并且Sharepoint系统中已经创建的Web Part仍旧使用并仍旧可以成功的找到老的Web Part程序集。所以即使你部署了新的Web Part程序集,老的Web Part仍旧没有改变。
因此,你只有删除这些老的Web Part,然后再依据新的Web Part功能来创建新的Web Part实例,但由于拷贝了原来的Web Part的相关信息,所以新版本Web Part实例的相关属性信息还是原来的样子。 所以,只有选项C正确描述了这样的操作。
选项A. 这句话等于没说,我们本来就是要通过解决方案来部署我们的更改。
选项B. 完全是混淆描述,你怎么能直接到GAC的程序集中拷贝所作的更改呢?所有的更改应该是在解决方案中完成,然后再编译并部署到GAC中。
选项D. 我们知道,只有Web Part的描述信息可以上载到Web Part Gallery,而Web Part的功能实现是在程序集,所以,本选项的操作其实并没实现本题的要求。
因此本题答案应该选 C
参考
http://msdn.microsoft.com/en-us/library/ee231579.aspx
http://msdn.microsoft.com/en-us/library/dd583149(v=office.11).aspx
Question 151
You are designing a SharePoint 2010 intranet site for your company. Your design needs to meet the following requirements:
.A SharePoint feature (feature A) must make a custom list definition available for the entire site collection.
.Another SharePoint feature (feature B) must provision an instance of that custom list definition in the particular
site where the feature is activated. Which approach should you recommend?
A. Set the scope of feature A to Web and the scope of feature B to Site. Add feature A to the set of Activation Dependencies in feature B.
B. Set the scope of feature A to Web and the scope of feature B to Site. Add feature B to the set of Activation Dependencies in feature A.
C. Set the scope of feature A to Site and the scope of feature B to Web. Add feature A to the set of Activation Dependencies in feature B.
D. Set the scope of feature A to Site and the scope of feature B to Web. Add feature B to the set of Activation Dependencies in feature A.
解析:
你为公司设计一个Sharepoint2010内部网站,需要满足如下要求:
要求1.功能A为所有的网站集提供一个列表定义
要求2.功能B基于要求1中的列表定义在其所被部署和激活的网站上创建列表实例
你该如何操作呢?
首先,根据要求1,功能A属于网站集级别。
其次,由于功能B是依赖于功能A,用于创建具体的网站实例,所以功能B的级别属于具体的Web,且依赖于功能A。在所有备选项中只有选项C符合这样的逻辑。
因此本题答案应该选 C
参考
http://msdn.microsoft.com/zh-cn/library/aa543162(v=office.14).aspx
Sharepoint学习笔记—习题系列--70-576习题解析 -(Q147-Q151)的更多相关文章
- Sharepoint学习笔记—ECM系列—文档列表的Metedata Navigation与Key Filter功能的实现
如果一个文档列表中存放了成百上千的文档,想要快速的找到你想要的还真不是件容易的事,Sharepoint提供了Metedata Navigation与Key Filter功能可以帮助我们快速的过滤和定位 ...
- Sharepoint学习笔记—ECM系列--文档集(Document Set)的实现
文档集是 SharePoint Server 2010 中的一项新功能,它使组织能够管理单个可交付文档或工作产品(可包含多个文档或文件).文档集是特殊类型的文件夹,它合并了唯一的文档集属性以及文件夹和 ...
- Sharepoint学习笔记—习题系列--70-576习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-576习题解析 为便于查阅,这里整理并列出了70-576习题解析系列的所有问题,有些内容可能会在以后更新. 需要事先申明的是: 1. ...
- Sharepoint学习笔记—习题系列--70-573习题解析 --索引目录
Sharepoint学习笔记—习题系列--70-573习题解析 为便于查阅,这里整理并列出了我前面播客中的关于70-573习题解析系列的所有问题,有些内容可能会在以后更新, ...
- Deep Learning(深度学习)学习笔记整理系列之(五)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(八)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(七)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(六)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(四)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
- Deep Learning(深度学习)学习笔记整理系列之(三)
Deep Learning(深度学习)学习笔记整理系列 zouxy09@qq.com http://blog.csdn.net/zouxy09 作者:Zouxy version 1.0 2013-04 ...
随机推荐
- N个数依次入栈,出栈顺序有多少种?
对于每一个数来说,必须进栈一次.出栈一次.我们把进栈设为状态‘1’,出栈设为状态‘0’.n个数的所有状态对应n个1和n个0组成的2n位二进制数.由于等待入栈的操作数按照1‥n的顺序排列.入栈的操作数b ...
- 分享几个.NET WinForm开源组件,纪念逐渐远去的WinForm。。。
前面3个月的时间内,这些.NET开源项目你知道吗?系列文章已经发表了3篇,共计45个平时接触比较少,曾经默默无闻的.NET开源项目,展示给大家,当然不是每个人都能用得上,但也的确是有些人用了,反响还不 ...
- jQuery的Internal DSL
JQuery的核心理念是write less,do more(写的更少,做的更多),那么链式方法的设计与这个核心理念不谋而合.那么从深层次考虑这种设计其实就是一种Internal DSL. DSL是指 ...
- Oracle OCP 1Z0-053 Exam Topics
根据OU官方发布的考试大纲,OCP 1Z0-053考点如下: 1. Database Architecture and ASM Describe Automatic Storage Managemen ...
- 【JUC】JUC集合框架综述
一.前言 完成了JUC的锁框架的分析后,现在分析JUC集合框架,之前分析过的集合框架,很大程度上都不是线程安全的,其在多线程环境下会出现很多问题,为了保证在多线程环境下仍然能够正确安全的访问集合,出现 ...
- git取消跟踪文件
取消跟踪文件: $git rm --cached FILENAME 取消跟踪目录: $git rm --cached FILENAME -r
- 【原创】基于日志增量,统计qps,并基于ip排序
增量统计日志行数(只统计上一秒) dns_qps.py #!/usr/bin/env python #_*_coding:utf-8_*_ import datetime import re impo ...
- 让动态的 iframe 内容高度自适应
使用iframe加载其他页面的时候,需要自适应iframe的高度 这里加载了两个不同内容高度的页面至iframe中 1. 没有设置高度 <div class="iframe-wrapp ...
- 8.1 EntityTypeConfiguration Class in Code-First【Code First系列】
在我们学习Fluent API之前,先来看看Fluent API中重要的类--EntityTypeConfiguration吧. EntityTypeConfiguration类是Fluent API ...
- WP7 手机软件纪念 - 稍后读软件
在本月换机之际,决定写篇博客纪念一下我在 WP7 手机上开发的一个稍后读软件.这个工具开发完成后,两年间,我的 WP7 手机 80% 的用途,都发挥在了它身上. 这个软件其实是一个离线阅读工具,非常类 ...