Latest MCTS 70-573 Dumps Real Exam Download 41-50

Ensurepass

QUESTION 41

You need to connect two Web Parts by using the IWebPartRow interface. Which method should you use?

 

A. DataItem

B. GetFieldValue

C. GetRowData

D. GetTableData

 

Correct Answer: C

Explanation/Reference:

MNEMONIC RULE: “iWebPartRow = GetRowData”

Returns the data for the row that is being used by the interface as the basis of a connection between two WebPart controls.

IWebPartRow.GetRowData Method http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.webparts.iwebpartrow.getrowdata.aspx

 

 

QUESTION 42

You create a sandboxed solution that contains a Web Part.

You need to debug the Web Part by using Microsoft Visual Studio 2010. To which process should you attach the debugger?

 

A. owstimer.exe

B. spucworkerprocess.exe

C. spucworkerprocessproxy.exe

D. w3wp.exe

Correct Answer: B

Explanation/Reference:

MNEMONIC RULE: “Sandbox worker needs no proxy”

To provide additional protection, the solution’s assembly is not loaded into the main IIS process (w3wp.exe). Instead, it is loaded into a separate process (SPUCWorkerProcess.exe).

Sandboxed Solution Considerations http://msdn.microsoft.com/en-us/library/ee231562.aspx

If the project type lets you change the Sandboxed Solution property and its value is set to true, then the debugger attaches to a different process (SPUCWorkerProcess.exe).

Debugging SharePoint Solutions http://msdn.microsoft.com/en-us/library/ee231550.aspx

 

clip_image002

 

 

QUESTION 44

You create a SharePoint farm solution that contains a Web Part.

You need to debug the Web Part by using Microsoft Visual Studio 2010.

To which process should you attach the debugger?

 

A. owstimer.exe

B. spucworkerprocess.exe

C. spucworkerprocessproxy.exe

D. w3wp.exe

 

Correct Answer: D

Explanation/Reference:

Farm solutions are run by IIS worker process, which is w3wp.exe

Farm Solutions http://msdn.microsoft.com/en-us/library/ff798425.aspx

 

 

QUESTION 45

You create and deploy a custom Web Part.

You add the Web Part to a page and receive a run-time error. You need to display the detailed information of the error on the page.

Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)

 

A. In the web.config file, set CallStack=”True”.

B. In the web.config file, set customErrors=”RemoteOnly”.

C. In the registry, set the EnableDebug value to 1.

D. In the registry, set the DisableLoopbackCheck value to 1.

 

Correct Answer: AB

 

Explanation/Reference:

MNEMONIC RULE: “Check all with web.config”

Turning off custom errors in _layouts Web.Config for debugging mode in SharePoint 2010 http://www.khamis.net/blog/Lists/Posts/Post.aspx?ID=12

 

 

QUESTION 46

You have a Web Part that causes an error.

You need to ensure that you can view the trace history in the Trace.axd file.

What should you configure in the web.config file?

 

A. In the <system.web> element, add the following line of code:

<trace enabled=”true” localOnly=”true” pageOutput=”false” />

B. In the <SafeMode> element, configure the following attributes:

CallStack=”true”

AllowPageLevelTrace=”true”

C. In the <SafeMode> element, configure the following attributes:

CallStack=”false”

AllowPageLevelTrace=”true”

D. In the <system.web> element, configure the following element:

<trace enabled=”false” localOnly=”true” pageOutput=”true” />

In the <SafeMode> element, configure the following attribute:

AllowPageLevelTrace=”true”

 

Correct Answer: A

 

Explanation/Reference:

MNEMONIC RULE: “Trace.axd = trace enabled=”true””

trace Element (ASP.NET Settings Schema) http://msdn.microsoft.com/en-us/library/6915t83k.aspx

 

 

QUESTION 47

You create a user control named MySearch.ascx.

You plan to change the native search control in SharePoint to MySearch.ascx. You need to provide the site administrator with the ability to change the out-ofthe-box search control to MySearch.ascx. What should you do?

 

A. Configure the SearchBox.dwp in the Web Part gallery.

B. Override the search delegate control by using a Feature.

C. Modify the <SafeControls> element in the web.config file.

D. Modify 14TEMPLATEFEATURESSearchWebPartsSearchBox.dwp.

 

Correct Answer: B

Explanation/Reference:

MNEMONIC RULE: “change the native search control = Override the search delegate”

Customizing the search box using a feature http://sharepointschool.net/2010/10/14/customizing-the-search-box-using-a-feature/

 

 

QUESTION 48

You create a user control named MySearchBox.ascx.

You plan to change the native search control in SharePoint to MySearchBox.ascx. You implement a Feature that contains the following code segment.

<Control Id=”SmallSearchInputBox”

Sequence=”100″

ControlSrc=”~/_controltemplates/MySearchBox/MySearchBox.ascx”>

</Control>

You discover that the MySearchBox.ascx control fails to appear. You need to ensure that the MySearchBox.ascx control appears.

What should you do?

 

A. Add the ControlClass attribute.

B. Add the ControlAssembly attribute.

C. Modify the Sequence attribute value.

D. Remove the ControlSrc attribute value.

Correct Answer: C

Explanation/Reference:

MNEMONIC RULE: “Sequence to appear”

ControlSrc is necessary for user control, whereas ControlClass and ControlAssembly are needed for server controls.

Sequence property specifies the sequence number for the control, which determines whether the control is added to the control tree for a page. The control with the lowest sequence number is added to the tree.

Control Element (Delegate Control) http://msdn.microsoft.com/en-us/library/ms469179.aspx

 

 

QUESTION 49

You have several SharePoint sites.

You plan to load a custom script in all pages of the sites. You need to ensure that you can activate or

deactivate the script at the site level.

What should you do?

 

A. Create a site definition and modify the CustomJSUrl attribute in the Onet.xml file.

B. Create a site definition and modify the <system.web> element in the web.config file.

C. Create a user control that contains the script. Create a Feature that overrides the ControlArea delegate control.

D. Create a user control that contains the script. Create a Feature that overrides the AdditionalPageHead delegate control.

 

Correct Answer: D

Explanation/Reference:

MNEMONIC RULE: AdditionalPageHead

The delegate control resides in the AdditionalPageHead control on the page. It registers some ECMAScript (JavaScript, JScript) on the page.

How to: Customize a Delegate Control http://msdn.microsoft.com/en-us/library/ms470880.aspx

 

 

QUESTION 50

You have a SharePoint site that uses a master page named Master1.master.

You create a custom user control named MySearch.ascx.

You need to change the default search box to MySearch.ascx.

What should you do?

 

A. Modify the SmallSearchInputBox control tag in the master page, and then configure the ControlId property.

B. Modify the SmallSearchInputBox control tag in the master page, and then configure the ControlSrc property.

C. Create a Web Part that uses MySearch.ascx. In the master page, add a control tag that references the .webpart file.

D. Create a Visual Web Part that uses MySearch.ascx. In the master page, add a control tag that references the .webpart file.

 

Correct Answer: B

Explanation/Reference:

MNEMONIC RULE: “ControlSrc”

Delegate Control (Control Templatization) http://msdn.microsoft.com/en-us/library/ms463169.aspx

 

Download Lates MCTS 70-573 Real Free Tests , help you to pass exam 100%.