Which approach should you recommend?
You are designing a process for deploying an ASP.NET MVC 2 Web application to IIS 6.0.
You need to ensure that the Web application properly handles Web requests. Which
approach should you recommend?
Which code segment should you use?
You use Microsoft .NET Framework 4 to develop an application. You use the XmlReader class to load
XML from a location that you do not control. You need to ensure that loading the XML will not load
external resources that are referenced in the XML. Which code segment should you use?
Which approach should you recommend?
An application will be deployed in a SharePoint 2010 server farm that is managed by
department-level site collection administrators. You need to design this application to meet
all the following requirements: ·The application must contain a custom Web Part that
accesses the object model at the farm level. .The application must be available anywhere in
the farm as more departments require the functionality. .The site collection administrator in
each department must be able to activate the application without the help of the farm
administrator. .The level of access to the SharePoint 2010 object model must be limited.
Which approach should you recommend?
Which code segment should you insert at line 08?
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 2008 database. You add the following table to the database.
CREATE TABLE Orders(
ID numeric(18, 0) NOT NULL,
OrderName varchar(50) NULL,
OrderTime time(7) NULL,
OrderDate date NULL)
You write the following code to retrieve data from the OrderTime column. (Line numbers are
included for reference only.)
01 SqlConnection conn = new SqlConnection (…) ;
02 conn.Open();
03 SqlCommand cmd = new SqlCommand(
“SELECT ID, OrderTime FROM Orders”, conn);
04 SqlDataReader rdr = cmd.ExecuteReader(); 05
06 while(rdr.Read())
07 {08
09 }
You need to retrieve the OrderTime data from the database.
Which code segment should you insert at line 08?
You need to ensure that all users can use the drag-and-drop functionality
You are debugging a Windows application that uses Windows Presentation Foundation
(WPF) and Microsoft Visual Studio 2010. The application is deployed as an XAML browser
application (XBAP). Some users report that they are not able to use the drag-and-drop
functionality. You need to ensure that all users can use the drag-and-drop functionality.
What should you do?
You need to ensure that all users can use the Web Part to update the description of the current site
You create a Web Part that programmatically updates the description of the current SharePoint
site. The Web Part contains the following code segment. (Line numbers are included for reference
only.) 01 SPSecurity.RunUithElevatedPrivileges (delegate() 02 { 03 SPSite currSite =
SPConcext.Current.Site ; 04 SPUeb currUeb = SPContext.Current.Ueb ; 05 using (SPSite eSite =
new SPSite ( currSite.ID ) ) 06 { 07 using (SPWeb eWeb = eSite.OpenUeb ( currUeb.ID ) ) 08 { 09
Web.AllowUnsafeUpdates = true; 10 currUeb.Description = “Test”; 11 currUeb.Update (); 12
eUeb.AllowUnsafeUpdates = false; 13 } 14 } 15 } 16 }; Users report that they receive an Access
Denied error message when they use the Web Part. You need to ensure that all users can use the
Web Part to update the description of the current site. What should you do?
Which code segment should you insert at line 03?
You use Microsoft .NET Framework 4 to develop an application. You write the following code to
update data in a Microsoft SQL Server 2008 database. (Line numbers are included for reference
only.)
01 private void ExecuteUpdate (SqlCoiranand cmd,
string connString, string updateStrnt)
02 {
03
04 }
You need to ensure that the update statement executes and that the application avoids connection
leaks.
Which code segment should you insert at line 03?
You need to ensure that you can modify the start of authority (SOA) record for contoso.com
Which connection string should you use?
You use Microsoft .NET Framework 4 to develop an application that connects to a Microsoft SQL
Server 200B database. You need to ensure that the application connects to the database server by
using SQL Server authentication. Which connection string should you use?
You need to ensure that the application allows users to perform the following tasks: • Bookmark their locati
You are designing an application by using Windows Presentation Foundation (WPF) and
Microsoft .NET Framework 4. You create a control named HelpViewer to view the Help
documentation of the application. The HelpViewer control must be available to al windows in
the application. You need to ensure that the application allows users to perform the
following tasks: • Bookmark their location in the documentation and return to the bookmark
from any window. • Hide the HelpViewer control. • Dock the HelpViewer control. You create
a main window as a base class. What should you do next?