Sharepoint学习笔记—习题系列--70-576习题解析 -(Q78-Q80)
Question 78
You are designing an application configuration approach for a custom SharePoint 2010 application. You need to design the application configuration to:
.Store and secure custom configuration settings for the application including connection strings, server names, file paths, and other miscellaneous settings.
.Read and display the settings on the site with an administrative user interface that can be configured using a custom _layouts page.
.Store configuration settings at the farm, Web application, site collection, and site levels as needed.
You need to design a storage option that is simple and lightweight in structure and programmatically configurable. Which approach should you recommend?
A. Add custom configuration settings to the web.config file and programmatically read this file to display the custom settings.
B. Use a hierarchical object store to save the custom configuration settings and programmatically read it to display the custom settings.
C. Use a property bag to store the custom configuration settings.
D. Use SharePoint lists to store the custom configuration settings.
解析:
你需要为一个Sharepoint2010应用程序设计一个存取配置信息的方案,需要满足的条件如下:
要求1. 涉及的配置信息包括连接字符串,服务器名,文件路径以及其它各种各样的设置信息。
要求2. 通过创建的用于管理的应用程序页,在此页面上读取和显示网站上的相关配置信息。
要求3 配置信息涉及场,Web Application,网站集以及网站等诸多层次。
你所提供的保存这些配置信息的方案需要简单,结构不复杂并且支持编程操作。
我们来分析各选项:
选项A.使用Web.config。首先我们知道,Web.config针对的是Web Application层次及以下的对象,而且创建其管理页面也非常复杂,所以不符合本题要求。
选项B.使用hierarchical object store,前面我们说过所谓hierarchical object store是指你通过创建继承自SPPersistedObject类的对象类实例来保存关于Farm, Web applications, features等等层次的用户的配置信息。此方法适用于你需要保存比较复杂的对象时使用,所以也不符合本题所要求的简单,结构不复杂的要求。
选项C.使用属性包。我们知道Sharepoint对SPFarm,SPWebApplication,SPSite,SPWeb和SPList这几个层次的对象均提供了属性包,通过对应的类对象可以直接使用它们,非常快捷简单,示例代码如下:
using System;
using System.Collections;
using Microsoft.SharePoint;
using Microsoft.SharePoint.Utilities; namespace Test
{
class Program
{
static void Main(string[] args)
{
using (SPSite site = new SPSite("http://localhost"))
{
using (SPWeb web = site.OpenWeb())
{
SPPropertyBag props = web.Properties;
foreach (DictionaryEntry de in props)
{
Console.WriteLine("Key = {0}, Value = {1}", de.Key, de.Value);
}
}
}
Console.ReadLine();
}
}
}
所以选项C符合本题要求。
选项D.使用列表。首先,列表直接就显示在内容页面(Content Page)上,而非要求2所讲的去创建用于管理的应用程序页(Application Page)。其次,使用列表来存储配置Sharepoint场,Web Application级别的信息并不合适,如果要通过代码来实现本题目所涉及的配置内容很显得比较复杂,需要考虑的东西比较多。
因此本题答案应该选C
参考
http://msdn.microsoft.com/en-au/library/ms460914(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.properties.aspx
Question 79
You are designing a SharePoint 2010 intranet site. Your design must:
.Specify the manner in which to store and read custom configuration settings.
.Use a standard user interface to allow the configuration settings to be created or changed.
You need to design the solution at the site collection and site levels to meet these requirements. Which approach should you recommend?
A. Use the property bag to store custom configuration settings.
B. Use the hierarchical object store to store custom configuration settings
C. Use SharePoint lists to store the custom configuration settings
D. Add custom configuration settings in the web.config file to display the settings
解析:
你需要设计一个Sharepoint2010内部网站满足如下要求:
要求1. 确定以哪种方式存取用户配置信息
要求2. 使用标准的用户界面以支持创建和修改配置信息
你需要在网站与网站集层次满足以上要求。
由于本题要求使用标准的用户界面以支持创建和修改配置信息,比较各备选项就发现只有使用列表才能符合要求了,因为Property bag与hierarchical object store均未提供用户界面进行修改,它们都需要通过代码编程实现。Web.config也不是标准的用户界面所能操纵的,况且它主要是针对Web Application级别的配置设置。
因此本题答案应该选 C
参考
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.meetings.propertybag.aspx
http://msdn.microsoft.com/en-au/library/ms460914(v=office.12).aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spweb.properties.aspx
Question 80
You are designing a SharePoint 2010 farm implementation that will include an extranet zone that will employ forms-based authentication (FBA). The plan must:
.Specify how farm administrators will manage modifications to the configuration settings for the FBA within each Web application.
.Support granular modifications to the individual Web applications.
.Include a process to apply the modifications to the SharePoint configuration database.
.Specify a process to deploy the changes throughout the server farm by propagating the changes to all Web frontend servers.
You need to create a software configuration management plan for the farm that meets all these requirements. Which approach should your plan recommend?
A. Create a feature that contains code to read, modify, and save the configuration setting for the SPWebApplication object for each Web application. Save the settings in the hierarchical object store by creating a SPPersistedObject class to store the configuration.
B. Create a feature that contains code to modify the configuration settings to the web.config file for each Web application. Then propagate the changes programmatically by implementing the SPWebConfigModification class.
C. Build a custom list for each Web application that stores the required configuration information. Create a custom workflow that uses the Set Field in Current Item action to synchronize the settings in the list with the configuration database and the Web servers.
D. Build the required changes declaratively by creating an XML extension containing the settings needed. Deploy the file to the 14\Config directory. Then use the Stsadm copyappbincontent command to merge these changes with the existing web.config file.
解析:
你负责设计一个包含外部区域(支持表单认证FBA)的Sharepoint2010场应用,需要满足如下要求:
要求1. 指明场管理员如何针对每个Web Application维护用于表单认证的配置设置。
要求2. 支持对各个Web Application分别进行修改
要求3. 实现把上述的修改传播到场内所有的WFE服务器上
你需要针对Sharepoint场来制定一个软件配置管理方案以满足上述所有要求。
下面我们来分析各备选项:
选项A. Create a feature that contains code to read, modify, and save the configuration setting for the SPWebApplication object for each Web application. Save the settings in the hierarchical object store by creating a SPPersistedObject class to store the configuration.
我们知道,Web.config与Hierarchical object store均是针对Web Application层次的配置存储途径,Hierarchical object store主要用于为第三方应用程序通过创建继承自SPPersistedObject类的对象来实现存取配置信息提供一个应用框架。实例化 SPPersistedObject 的对象保留在 SharePoint 2010 配置数据库中。而我们知道Sharepoint使用配置数据库来存储服务器场中服务器的配置和网站映射信息。每个服务器场只能有一个配置数据库。 由此就无法实现本题的要求3,即把上述的修改传播到场内所有的WFE服务器上。所以本选项被排除
选项B. Create a feature that contains code to modify the configuration settings to the web.config file for each Web application. Then propagate the changes programmatically by implementing the SPWebConfigModification class.
通过Web.config来实现,我们知道SharePoint Foundation用到了大量的 web.config 文件。Sharepoint中的每个 Web Application都对应一个文件,并且每台前端 Web 服务器中包含每个这些文件的副本。为了更加轻松地自定义 web.config 文件,SharePoint Foundation 提供了两种更改方式。第一种方式是通过创建包含一组 web.config 修改的 XML 文件以声明方式注册 web.config 项,此方式会把所有WebApplication的web.Config都修改掉。第二种就是使用 SharePoint Foundation 对象模型来修改 web.config 设置。
我们可以以编程方式添加和删除 Web.config 设置,修改 web.config 设置的一种方法是使用 Microsoft.SharePoint.Administration 命名空间的 SPWebConfigModification 类,这使得您能够动态地对实体进行注册。这些修改保留在配置数据库中,在那里,它们充当一种虚拟 web.config,后者其实上充当 SharePoint Foundation Web 应用程序的 .config 文件堆栈的最后一层。在调用 SPWebService.ApplyWebConfigModifications 方法时,所做更改才会生效。
调用 ApplyWebConfigModifications 方法将安排一个计时器作业以在整个服务器场中部署更改【也就是本题要求3所指的”传播”效果】。若要将 web.config 修改应用于特定的 Web 应用程序,请将此修改添加到 Web 应用程序的 web.config 修改集 (WebConfigModifications) 中。例如,您可以使用 oWebSite.Site.WebApplication.WebConfigModifications.Add(MyModification) 将 web.config 修改添加到特定网站的父 Web 应用程序中。即使是将 web.config 修改添加到单个 Web 应用程序,您也仍旧必须调用 ApplyWebConfigModifications。
由上面分析可以看出,选项B是本题想要的答案。
选项C. Build a custom list for each Web application that stores the required configuration information. Create a custom workflow that uses the Set Field in Current Item action to synchronize the settings in the list with the configuration database and the Web servers.
列表并不是用来存储Web Application级别配置信息的合理架构,所以直接排除。
选项D. Build the required changes declaratively by creating an XML extension containing the settings needed. Deploy the file to the 14\Config directory. Then use the Stsadm copyappbincontent command to merge these changes with the existing web.config file.
本选项虽然使用了Web.config,但它的操作方式是将配置修改影响到所有的Web.config,而满足不了本题要求2所提的:支持对各个Web Application分别进行修改。所以也被排除。
因此本题答案应该选 B
参考
http://msdn.microsoft.com/zh-cn/library/bb861909(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.aspx
http://dsen-25.blogspot.com.au/2011/08/hierarchical-object-store-in-sharepoint.html
http://msdn.microsoft.com/zh-cn/library/bb677365(v=sql.105).aspx
Sharepoint学习笔记—习题系列--70-576习题解析 -(Q78-Q80)的更多相关文章
- 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 ...
随机推荐
- 推荐20款基于 jQuery & CSS 的文本效果插件
jQuery 和 CSS 可以说是设计和开发行业的一次革命.这一切如此简单,快捷的一站式服务.jQuery 允许你在你的网页中添加一些真正令人惊叹的东西而不用付出很大的努力,要感谢那些优秀的 jQue ...
- WOW.js – 在页面滚动时展现动感的元素动画效果
在一些网页上,当你滚动页面的时候会看到各式各样的元素动画效果,非常动感.WOW.js 就是一款帮助你实现这种 CSS 动画效果的插件,很容易定制,你可以改变动画设置喜欢的风格.延迟.长度.偏移和迭代等 ...
- web开发者谷歌浏览器常用插件
1.Allow-Control-Allow-Origin 安装此插件解决跨域问题,在本地起服务器可访别的域的数据. 需在Access-Control-Expose-Headers加上Allow- ...
- JVM的GC概述
JVM的GC概述 GC即垃圾回收,是指jvm用于释放那些不再使用的对象所占用的内存.在充分理解了垃圾收集算法和执行过程后,才能有效的优化它的性能. 有些垃圾收集专用于特殊的应用程序.比如,实时应用程序 ...
- spring学习遇到的问题汇总
1.spring注解路由方面的误解 我一直以为在web.xml中配置拦截*.action后,在注解路由的时候必须要xxxx.action. 刚才发现,访问的时候xxxx.action,然后@Reque ...
- 实现iOS图片等资源文件的热更新化(一): 从Images.xcassets导出合适的图片
本文会基于一个已有的脚本工具自动导出所有的图片;最终给出的是一个从 Images.xcassets 到基于文件夹的精简 合适 的图片资源集的完整过程.难点在于从完整图片集到精简图片集,肯定是基于一个定 ...
- 歌词文件解析(一):LRC格式文件的解析
LRC是英文lyric(歌词)的缩写,被用做歌词文件的扩展名.以lrc为扩展名的歌词文件可以在各类数码播放器中同步显示.LRC 歌词是一种包含着“*:*”形式的“标签(tag)”的基于纯文本的歌词专用 ...
- 改进网站设计的免费jQuery插件Top 7
Animate Scroll.js是一个简单的jQuery插件,它用来为滚动增加延迟效果.同时你还可以自定义滚动样式(30多种滚动效果)和滚动速度,还有一个可以操纵”滚动结束位置”的”padding” ...
- jquery简单原则器(匹配索引为指定值的元素)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- 使用Monkey进行压力测试
Android可以使用Monkey向应用发送一连串的随机操作,就好像把手机交给一只猴子让它任意操作一样,以此来检测应用是否健壮,是否容易出错或崩溃.操作的类型包括触屏.移动.按键等. Monkey的语 ...