SharePoint Study Notes-exercise series-70-exercise analysis-(Q147-Q151)

Source: Internet
Author: User

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 shocould 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.

Resolution:
Your company has a public sharepoint2010 website, which uses several load balancing WFE servers. Your company has changed the company name. Therefore, you need to use as few development and minimize the impact as possible to change the content of the company name on the website. What do you do?
As we know, as long as IIS is restarted, The SharePoint website will be temporarily suspended and users will not be able to access the SharePoint website. This is definitely not what this question is about. Both option B and option D need to restart IIS. Although option D modifies the Web. config file, we know that to make the modification of this file take effect, we often need to restart IIS. Therefore, the B .d option can be excluded directly.
Option C tries to solve this problem by creating a new application page, which is obviously two different things. This question mainly requires you to modify the existing website content, instead of using a new company name to create new content. Therefore, option C should also be excluded.
Option A: You can use the powershell code segment to traverse objects in SharePoint and make corresponding changes without Restarting IIS.
Therefore, select a as the answer to this question.

Reference
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 shocould 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.


Resolution:
Your company has a public sharepoint2010 website running on two WFE servers without Server Load balancer. You need to upgrade a Web part on the website. This upgrade involves modifying the code of an assembly deployed in the GAC, and requires that the impact on the website be minimized, what do you do?
We know that Server Load balancer is built on the existing network structure. Under the idea of Server Load balancer, multiple servers are symmetric and each server has the same status, you can provide external services independently without the assistance of other servers. By using the Load Balancing Technology, requests sent from outside are distributed to a server in the symmetric structure according to certain rules, and the servers that receive the requests Independently respond to the client's requests. Through the application load balancing technology, the application service exceeds the limit that one server can only provide services for limited users. multiple servers can be used to provide services for a large number of users at the same time. When a server fails, the Server Load balancer automatically detects and stops distributing service requests to the server. Other normal servers continue to provide services, this ensures service reliability. [That is to say, the situation described here cannot be used in this question. We must intervene to reduce the impact of Web Part upgrades on various WFE servers]
First, if you use iisreset, the entire SharePoint website will be suspended. This is because iisreset forces stop all processes and restart them to ensure that all changes take effect after the restart. Of course, this impact is the biggest, so you can directly exclude option A. C.
As for recycle the application pool, we know that the application pool is a configuration that links one or more applications to one or more worker process sets. Because applications in the application pool are separated from other applications by working process boundaries, applications in an application pool will not be affected by problems caused by applications in other application pools. SharePoint websites are based on Web applications, while Web applications run in the application pool. If you recycle the program pool, the system will start a new process, and the new version of DLLs will be reloaded from GAC [this means that the new version of Web part assembly will be reloaded ]. Therefore, option B is the answer to this question.
As for option D, develop and deploy the SharePoint solution. We know that this method will restart IIS, so it is also excluded. The following describes how to deploy the SharePoint Farm solution:
The deployment step of the server farm solution creates a timer job. This timer job is used by the timer service on each web server in the server farm. This timer job also uses the SharePoint Foundation Management Web service to access the corresponding permissions to deploy solution files to each computer. Therefore, all servers must run these two services at the same time, deployment can be successful. First, analyze the package list to find the Assembly, application page, JavaScript, and other files that are not functional. Copy these items to the specified position in the list. Copy all files contained in the feature to the feature directory (% ProgramFiles % \ common files \ microsoft shared \ Web Server Extensions \ 14 \ template \ features subdirectory ). After the solution file is copied to the target computer, configuration resetting is arranged for all front-end web servers. After that, the deployment file is restarted and Microsoft Internet Information Services (IIS) is restarted) [here is the description ]. The server farm administrator can specify the time for this operation. Finally, register the server farm solution function and submit the architecture and definition file to the configuration storage area.

Therefore, B is the answer to this question.

reference
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 shocould you recommend?
. 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.


Resolution:
You have created several SharePoint websites based on a website definition. You want to change the attribute values of a Web Part in the website definition and apply the changes to all related websites, what should you do if less development work is required?
First, we know that if you create a website based on the website definition, you can no longer modify the website definition to modify those websites that have already been created. SharePoint provides feature stapling to expand the functions of an existing website without modifying the definition of the original website. However, in this way, you need to create a project and develop it. However, this question only involves modifying the Web Part attributes and does not involve upgrading its functions, so we can use powershell to do this. The following is an example of code:

$site = Get-SPSite "SiteCollectionURL"$webcoll = $site.AllWebs #Step through each web in site collectionforeach ($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

Therefore, option D is the correct solution to this question.
Option A. Update the website definition again. This method has been negated before.
Option B. Creating a delegate control does not work for the Web part you have developed, let alone code development.
Option C. to upgrade a Web part through code, you must create a solution and deploy it. You cannot directly perform operations such as this option. You do not need to modify the attributes of a Web part.
Therefore, select D as the answer to this question.

Reference
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 shocould 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.


Resolution:
You have a sharepoint2010 solution, which contains some Web parts deployed in the GAC. Now, the signing keys of these Web parts have changed, how do you upgrade these Web parts without changing their attributes?
As we know, webpart is the part that makes up a web page. It is the basic building block of the SharePoint site webpartpage. On the page of the SharePoint website, data display and data editing are all completed through one webpart. In essence, webpart is ASP.. Net custom controls are all described by a webpart file (. DWP) and webpart assembly (. DLL.
As this question has already pointed out: "This scheme contains some Web parts deployed in the GAC. Now, the Assembly signature (Signing Key) of these Web parts has changed ". That is to say, at this time, the Web part assembly is no longer the original assembly. You actually created an assembly to upgrade your Web part. The question asks you: "You need to upgrade these Web parts without modifying their attributes." We know that in the Web part. the webpart file defines its related property information. Therefore, we need to copy the information to the new webpart project.
After completing the above work and deploying a new Web part assembly, you will find that the SharePoint system still uses the old Web part, and you have not upgraded them. This is because this operation does not mean "Upgrade ". Because the new signed assembly is used, the old assembly still exists, and the Created Web Part in the SharePoint system still uses and can still be successfully found. So even if you deploy a new Web part assembly, the old Web part remains unchanged.
Therefore, you only need to delete these old Web parts and then create a new Web Part instance based on the new Web part function. However, because the original Web part information is copied, therefore, the attributes of the new Web Part instance are the same as those of the original version. Therefore, only option C correctly describes the operation.
Option A. This sentence does not mean that we would have to deploy our changes through solutions.
Option B. It is completely a mixed description. How can you directly copy the changes in the GAC assembly? All the changes should be completed in the solution, and then compiled and deployed to GAC.
Option D. we know that only the Web part description information can be uploaded to the Web Part gallery, and the Web part function is implemented in the Assembly. Therefore, the operation of this option does not actually meet the requirements of this question.
Therefore, C is the answer to this question.

Reference
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 particle
Site where the feature is activated. Which approach shocould 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.
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.

Resolution:
You have designed a pivopoint2010 internal website for your company to meet the following requirements:
Requirement 1. function A provides a list definition for all website sets
Requirement 2. function B creates a list instance on the deployed and activated Website Based on the list definition in requirement 1.
What do you do?
First, according to requirement 1, function a belongs to the website set level.
Secondly, because function B Depends on function A and is used to create a specific website instance, function B belongs to the specific web and depends on function. Among all the standby options, only option C conforms to this logic.
Therefore, C is the answer to this question.
Reference
Http://msdn.microsoft.com/zh-cn/library/aa543162 (V = office.14). aspx

SharePoint Study Notes-exercise series-70-exercise analysis-(Q147-Q151)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.