Sharepoint学习笔记—习题系列--70-576习题解析 -(Q135-Q137)
Question 135
You work for a software company that sells Web Parts to customers. You designed the first version of a Web Part named Weather 1.0. The company has already sold several hundred licenses of the Web Part. You designed a new solution package for Weather 2.0. Some customers who are already using Weather 1.0 will install Weather 2.0 in the same Web application as Weather 1.0. You need to design your package so that the functionality of Weather 1.0 will not be affected by the installation of Weather 2.0 in the same Web application. Which approach should you recommend?
A. Use the same assembly name and namespace for Weather 2.0 that you used for Weather 1.0. Create a new .web part file. Increment the version number in the .web part file.
B. Use the same assembly name and namespace, but increment the version number of the assembly package. Use the same .web part file that you used for Weather 1.0.
C. Use the same assembly name and namespace, but increment the version number of the assembly package. Configure assembly binding redirection from version 1.0 of the assembly to version 2.0. Use the same .web part file that you used for Weather 1.0.
D. Use the same assembly name and namespace, but increment the version number of the assembly package. Create a new .web part file.
解析:
你为一家专门为客户提供Web part产品的公司开发了一个名为Weather 1.0版本的Web Part,此公司已经卖出去了几百套此Web Part, 你现在开发了此Web Part的新版本Weather 2.0,以前已经使用Weather 1.0的老客户需要在他们应用的环境中安装Weather 2.0,你需要保证Weather 1.0的运行功能不会因为Weather 2.0的安装受影响。你该采用何种措施来达成此目的呢?
顾名思义,WebPart就是组成网页(Web)的部件(Part),它是SharePoint站点WebPartPage的基本构建块。直观的看,在SharePoint网站的页面上,数据的显示、数据的编辑,都是通过一个一个的WebPart来完成的;实质上,WebPart是ASP.NET自定义控件,都是由一个WebPart说明文件(.dwp)和WebPart程序集(.dll)组成。
如果你对早先部署的WebPart程序集(.dll)进行了升级,那么原先添加的Web Part就会停止工作,因为Sharepoint找不到针对原先Web part的程序集了。【这也是本题要求尽量避免的】
由于.NET支持并行存储和执行同一程序集的不同版本,这种支持内置于运行时基础结构中。 因为强名称程序集的版本号是其标识的一部分,所以运行时能够在全局程序集缓存中存储同一程序集的多个版本,并且在运行时加载这些程序集。根据这一特性,我们就可以创建一个新的Feature,但使用相同的程序集签名和不同的版本号,这样我们就解决了WebPart程序集(.dll)升级后找不到原程序集而造成的已安装Web Part运行失效的问题。 而备选项中,选项D符合这样的操作。
选项A. 修改.web part文件中的Version并不影响程序集的Version,如果程序集的Version不变就会覆盖掉原来的WebPart程序集(.dll),造成已部署Web Part的停工,所以排除。
选项B. 如果使用的是与Weather 1.0相同的.web part(内有Web Part版本号)文件,那还叫什么功能升级呢?所以排除。
选项C. 犯了与选项B一样的错误,使用的是与Weather 1.0相同的.web part文件。所以排除。
因此本题答案应该选 D
参考
http://blogs.msdn.com/b/andrasg/archive/2011/07/19/the-good-solution-for-versioning-sharepoint-2010-webparts.aspx
http://msdn.microsoft.com/en-us/library/cc768621(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ff407219(v=office.14).aspx
http://msdn.microsoft.com/en-us/library/ms227561.aspx
http://msdn.microsoft.com/zh-cn/library/vstudio/fdhkd3a5.aspx
Question 136
You are designing a SharePoint 2010 application. You have a requirement to allow access to a Microsoft Windows .NET Framework assembly across multiple Web applications in a farm. An assembly element has been added to the solution manifest (manifest.xml). You need to ensure that the deployment of the assembly meets the requirements. Which approach should you recommend?
A. Specify a Deployment Target of GlobalAssemblyCache.
B. Specify a Deployment Target of Web Application.
C. Specify a Location of GlobalAssemblyCache.
D. Specify a Location of Web Application.
解析:
你开发了一个Sharepoint2010应用程序,在你开发的解决方案的manifest.xml中你加入了程序集元素(assembly element),你需要保证在场内的不同Web Application之间可以访问这个开发的Microsoft Windows .NET Framework的程序集,你该如何部署你的开发才能满组上述需要呢?
本题使用到了解决方案文件manifest.xml:解决方案指令清单(通常称为 manifest.xml)存储在解决方案文件的根位置。此文件定义要处理的功能、网站定义、资源文件、Web 部件文件和程序集的列表。 在manifest.xml的assembly元素中指定要包含在解决方案中的程序集。
<Solution SolutionId="4AFC1350-F354-4439-B941-51377E845F2B" xmlns="http://schemas.microsoft.com/sharepoint/">
<FeatureManifests>
<FeatureManifest Location="FeatureLibrary\feature.xml"/>
</FeatureManifests>
<TemplateFiles>
<TemplateFile Location="ControlTemplates\Featurelibraryform.ascx"/>
</TemplateFiles>
<RootFiles>
<!-- These files go into the 12\ directory and can be used for Web services and global resources -->
<RootFile Location="ISAPI\MyWebService.asmx">
</RootFiles>
<Assemblies>
<Assembly DeploymentTarget="GlobalAssemblyCache"
Location="ms.samples.sharepoint.myFeature.dll"/>
</Assemblies>
</Solution>
其中DeploymentTarget属性:为可选属性,类型为 Text。程序集部署的首选目标。将程序集复制到由 DeploymentTarget 属性(对于 Web 应用程序)或全局程序集缓存(对于服务器场)指定的目标。可能的值:
GlobalAssemblyCache 如果程序集是一种场功能,则将其复制到全局程序集缓存。
WebApplication 如果程序集是一种 Web 应用程序功能,则将其复制到虚拟服务器的 bin 目录。
由于本题要求在场内的不同Web Application之间可以访问这个开发的Microsoft Windows .NET Framework的程序集,所以应该部署在全局程序集缓存中,即此属性值为GlobalAssemblyCache 。
因此本题答案应该选 A
参考
http://msdn.microsoft.com/zh-cn/library/ms442108(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/ms468837.aspx
Question 137
You are designing a SharePoint 2010 application. You need to plan the deployment of a user control named MyControlTemplate.ascx as a control template. What should be added to the solution manifest (manifest.xml) to achieve this goal?
A. Add a Template File element, specifying a Location of MyControlTemplate.ascx.
B. Add a Template File element, specifying a Location of Control Templates\MyControlTemplate.ascx.
C. Add a Root File element, specifying a Location of MyControlTemplate.ascx.
D. Add a Root File element, specifying a Location of Control Templates\MyControlTemplate.ascx.
解析:
你想要把一个名为MyControlTemplate.ascx的用户自定义控件部署成一个控件模板,你该如何添加此元素到解决方案的manifest.xml文件中呢?
此题的备选项涉及解决方案指令清单(manifest.xml)中的Template File元素与Root File元素。
Root File元素: 指定将解决方案文件复制到的根路径。使用此元素可部署由多个功能共享的本地化资源。共享的本地化资源位于 %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\Resources 文件夹中。例如,以下 XML 部署三个共享的本地化资源文件。
<RootFiles>
<RootFile Location="Resources\wingtip.resx" />
<RootFile Location="Resources\wingtip.en-US.resx" />
<RootFile Location="Resources\wingtip.es-ES.resx" />
</RootFiles>
Template File元素:指定要包括在该解决方案中的模板文件。Sharepoint的模板文件一般都是放在Template目录下,而控件模板则放在此目录下的ControlTemplates文件夹下(目录位置如图)。
<TemplateFiles>
<TemplateFile Location="ControlTemplates\Featurelibraryform.ascx"/>
</TemplateFiles>
因此本题答案应该选 B
参考
http://msdn.microsoft.com/zh-cn/library/ms450312(v=office.14).aspx
http://msdn.microsoft.com/zh-cn/library/aa543424(v=office.14).aspx
Sharepoint学习笔记—习题系列--70-576习题解析 -(Q135-Q137)的更多相关文章
- 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 ...
随机推荐
- SQL 数据库管理---公司培训
一.实例 一个SQL的服务引擎就是一个SQL实例,每装一次SQL就会产生一次实例. 实例分为命名实例和默认实例,一台Windows服务器可以有多个SQL实例,但是只能有一个默认实例. 不同的实例之间相 ...
- AngularJS之Directive(三)
前言 angular核心部分如下图几大块,最重要的莫过于指令这一部分,本文将重点讲解指令这一部分,后续笔者将通过陆续的学习来叙述其他如:factory.service等,若有叙述错误之处,欢迎各位指正 ...
- ios如何在#import方面提升编译性能
模块的使用非常简单,对于存在的工程,第一件事情就是让这个功能生效.可以在项目的Build Settings 中搜索Modules 找到这个选项,做以下的设置 默认的情况下都是开启的 对于系统自带的只需 ...
- java 中多线程的同步函数的运用
/* * 需求: * 银行有一个金库 * 有两个储户,分别存300元.每次存100 , 存三次 * * 这个是有线程问题的, * * 我们应该通过下边的三个方法来查找问题 * 1.明确哪些代码是多线程 ...
- Anliven - 基础知识梳理汇总 - 软件测试
基础知识梳理 - 软件测试 - 概念 基础知识梳理 - 软件测试 - 分类 基础知识梳理 - 软件测试 - 流程 基础知识梳理 - 软件测试 - 用例 基础知识梳理 - 软件测试 - 方法 基础知识梳 ...
- 数据库操作提示:Specified key was too long; max key length is 767 bytes
操作重现: 法1:新建连接——>新建数据库——>右键数据库导入脚本——>提示:Specified key was too long; max key length is 767 by ...
- svn 几个常用命令(持续更新)
1:获取某个版本号(3583)下的代码 svn co http://tech.yoai.com:8300/c ...
- vue-lazy-render: 延迟渲染大组件,增强页面切换流畅度
最近用element来做项目,在开发的过程中,突然发现页面的操作和切换在数据量大的时候相当卡,后来提了个issue,在furybean解答后才知道,我每个单元格都加了tooltip,会生成大量的节点, ...
- nodejs学习笔记一——nodejs安装
a.nodejs安装 nodejs的安装没有什么说的默认安装即可.安装包官网下载即可:nodejs官网 本人用的是window的安装包node-v4.2.6-x64.msi 安装完成后打开命令行查看使 ...
- 实现terminal代理
问题 作为一名Linuxer,熟练使用终端是一项必备技能,但终端中有时下载安装功能速度很慢,令人崩溃.我自然而然想到了可否加个代理,提高速度.我之前一直用shadowsocks,浏览器使用switch ...