2013年7月31日星期三

Dernières Microsoft MB7-840 70-565 70-561 70-503 70-502 de la pratique de l'examen questions et réponses téléchargement gratuit

Le produit de Pass4Test que vous choisissez vous met le pied sur la première marche du pic de l'Industrie IT, et vous serez plus proche de votre rêve. Les matériaux offerts par Pass4Test peut non seulement vous aider à réussir le test Microsoft MB7-840 70-565 70-561 70-503 70-502, mais encore vous aider à se renforcer les connaissances professionnelles. Le service de la mise à jour pendant un an est aussi gratuit pour vous.


Vous aurez une assurance 100% à réussir le test Microsoft MB7-840 70-565 70-561 70-503 70-502 si vous choisissez le produit de Pass4Test. Si malheuresement, vous ne passerez pas le test, votre argent seront tout rendu.


Pass4Test possède un l'outil de formation particulier à propos de test Microsoft MB7-840 70-565 70-561 70-503 70-502. Vous pouvez améliorer les techniques et connaissances professionnelles en coûtant un peu d'argent à courte terme, et vous preuver la professionnalité dans le future proche. L'outil de formation Microsoft MB7-840 70-565 70-561 70-503 70-502 offert par Pass4Test est recherché par les experts de Pass4Test en profitant les expériences et les connaissances riches.


Code d'Examen: MB7-840

Nom d'Examen: Microsoft (NAV 2009 C/SIDE Introduction)

Questions et réponses: 109 Q&As

Code d'Examen: 70-565

Nom d'Examen: Microsoft (Pro: Designing and Developing Enterprise Applications Using the Microsoft .NET Framework 3.5)

Questions et réponses: 138 Q&As

Code d'Examen: 70-561

Nom d'Examen: Microsoft (TS: MS .NET Framework 3.5, ADO.NET Application Development)

Questions et réponses: 170 Q&As

Code d'Examen: 70-503

Nom d'Examen: Microsoft (TS: Microsoft .NET Framework 3.5 C Windows Communication Foundation)

Questions et réponses: 158 Q&As

Code d'Examen: 70-502

Nom d'Examen: Microsoft (TS: Microsoft .NET Framework 3.5 – Windows Presentation Foundation)

Questions et réponses: 128 Q&As

Les produits de Pass4Test a une bonne qualité, et la fréquence de la mise à jour est bien impressionnée. Si vous avez déjà choisi la Q&A de Pass4Test, vous n'aurez pas le problème à réussir le test Microsoft MB7-840 70-565 70-561 70-503 70-502.


70-561 Démo gratuit à télécharger: http://www.pass4test.fr/70-561.html


NO.1 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You need to separate the security-related exceptions from the other exceptions for database operations at
run time.
Which code segment should you use?
A. catch (System.Security.SecurityException ex)
{
//Handle all database security related exceptions.
}
B. catch (System.Data.SqlClient.SqlException ex)
{
for (int i = 0; i < ex.Errors.Count; i++){
if (ex.Errors[i].Class.ToString() == "14") {
//Handle all database security related exceptions.
}
else{
//Handle other exceptions
}
}
}
C. catch (System.Data.SqlClient.SqlException ex)
{
for (int i = 0; i < ex.Errors.Count; i++){
if (ex.Errors[i].Number == 14){
//Handle all database security related exceptions.
}
else{
//Handle other exceptions
}
}
}
D. catch (System.Data.SqlClient.SqlException ex)
{
for (int i = 0; i < ex.Errors.Count; i++){
if (ex.Errors[i].Message.Contains("Security")){
//Handle all database security related exceptions.
}
else{
//Handle other exceptions
}
}
}
Answer: B

Microsoft   70-561   certification 70-561

NO.2 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
The application analyzes large amounts of transaction data that are stored in a different database.
You write the following code segment. (Line numbers are included for reference only.)
01 using (SqlConnection connection = new
SqlConnection(sourceConnectionString))
02 using (SqlConnection connection2 = new
SqlConnection(destinationConnectionString))
03 using (SqlCommand command = new SqlCommand())
04 {
05 connection.Open();
06 connection2.Open();
07 using (SqlDataReader reader = command.ExecuteReader())
08 {
09 using (SqlBulkCopy bulkCopy = new
SqlBulkCopy(connection2))
10 {
11
12 }
13 }
14 }
You need to copy the transaction data to the database of the application.
Which code segment should you insert at line 11?
A. reader.Read()
bulkCopy.WriteToServer(reader);
B. bulkCopy.DestinationTableName = "Transactions";
bulkCopy.WriteToServer(reader);
C. bulkCopy.DestinationTableName = "Transactions";
bulkCopy.SqlRowsCopied += new
SqlRowsCopiedEventHandler(bulkCopy_SqlRowsCopied);
D. while (reader.Read())
{
bulkCopy.WriteToServer(reader);
}
Answer: B

Microsoft examen   70-561   70-561 examen   70-561

NO.3 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a TextBox control named txtProductID. The application will return a list of active
products that have the ProductID field equal to the txtProductID.Text property.
You write the following code segment. (Line numbers are included for reference only.)
01 private DataSet GetProducts(SqlConnection cn) {
02 SqlCommand cmd = new SqlCommand();
03 cmd.Connection = cn;
04 SqlDataAdapter da = new SqlDataAdapter(cmd);
05 DataSet ds = new DataSet();
06
07 da.Fill(ds);
08 return ds;
09 }
You need to populate the DataSet object with product records while avoiding possible SQL injection
attacks.
Which code segment should you insert at line 06?
A. cmd.CommandText = string.Format("sp_sqlexec 'SELECT ProductID,
Name FROM Product WHERE ProductID={0} AND IsActive=1'", txtProductID.Text);
B. cmd.CommandText = string.Format("SELECT ProductID, Name FROM
Product WHERE ProductID={0} AND IsActive=1", txtProductID.Text);
cmd.Prepare();
C. cmd.CommandText = string.Format("SELECT ProductID, Name FROM
Product WHERE ProductID={0} AND IsActive=1", txtProductID.Text);
cmd.CommandType = CommandType.TableDirect;
D. cmd.CommandText = "SELECT ProductID, Name FROM Product WHERE
ProductID=@productID AND IsActive=1";
cmd.Parameters.AddWithValue("@productID", txtProductID.Text);
Answer: D

Microsoft   70-561   70-561   70-561   70-561

NO.4 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application uses Microsoft SQL Server 2005.
You write the following code segment. (Line numbers are included for reference only.)
01 String myConnString = "User
02 ID=<username>;password=<strong password>;Initial
03 Catalog=pubs;Data Source=myServer";
04 SqlConnection myConnection = new
05 SqlConnection(myConnString);
06 SqlCommand myCommand = new SqlCommand();
07 DbDataReader myReader;
08 myCommand.CommandType =
09 CommandType.Text;
10 myCommand.Connection = myConnection;
11 myCommand.CommandText = "Select * from Table1;
Select * from Table2;";
12 int RecordCount = 0;
13 try
14 {
15 myConnection.Open();
16
17 }
18 catch (Exception ex)
19 {
20 }
21 finally

NO.5 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
The connection string of the application is defined in the following manner.
"Server=Prod;Database=WingtipToys;Integrated
Security=SSPI;Asynchronous Processing=true"
The application contains the following code segment. (Line numbers are included for reference only.)
01 protected void UpdateData(SqlCommand cmd) {
02 cmd.Connection.Open();
03
04 lblResult.Text = "Updating ...";
05 }
The cmd object takes a long time to execute.
You need to ensure that the application continues to execute while cmd is executing.
What should you do?
A. Insert the following code segment at line 03.
cmd.BeginExecuteNonQuery(new AsyncCallback(UpdateComplete), cmd);
Add the following code segment.
private void UpdateComplete (IAsyncResult ar) {
int count = (int)ar.AsyncState;
LogResults(count);
}
B. Insert the following code segment at line 03.
cmd.BeginExecuteNonQuery(new AsyncCallback(UpdateComplete), cmd);
Add the following code segment.
private void UpdateComplete (IAsyncResult ar) {
SqlCommand cmd = (SqlCommand)ar.AsyncState;
int count = cmd.EndExecuteNonQuery(ar);
LogResults(count);
}
C. Insert the following code segment at line 03.
cmd.StatementCompleted += new
StatementCompletedEventHandler(UpdateComplete);
cmd.ExecuteNonQuery();
Add the following code segment.
private void UpdateComplete (object sender, StatementCompletedEventArgs e) {
int count = e.RecordCount;
LogResults(count);
}
D. Insert the following code segment at line 03.
SqlNotificationRequest notification = new
SqlNotificationRequest("UpdateComplete", "", 10000);
cmd.Notification = notification;
cmd.ExecuteNonQuery();
Add the following code segment.
private void UpdateComplete(SqlNotificationRequest notice) {
int count = int.Parse(notice.UserData);
LogResults(count);
}
Answer: B

certification Microsoft   70-561 examen   certification 70-561   70-561   certification 70-561

NO.6 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
The application throws an exception when the SQL Connection object is used.
You need to handle the exception.
Which code segment should you use?
A. Try
If conn IsNot Nothing Then
conn.Close()
' code for the query
End If
Catch ex As Exception
' handle exception
Finally
If conn Is Nothing Then
conn.Open()
End If
End Try
B. Try
' code for the query
conn.Close()
Catch ex As Exception
' handle exception
Finally
If conn IsNot Nothing Then
conn.Open()
End If
End Try
C. Try
' code for the query
conn.Open()
Catch ex As Exception
' handle exception
Finally
If conn IsNot Nothing Then
conn.Close()
End If
End Try
D. Try
' code for the query
conn.Open()
Catch ex As Exception
' handle exception
Finally
If conn Is Nothing Then
conn.Close()
End If
End Try
Answer: C

Microsoft examen   70-561   70-561   70-561 examen

NO.7 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a DataSet object named orderDS. The object contains a table named Order as
shown in the following exhibit.
The application uses a SqlDataAdapter object named daOrder to populate the Order table.
You write the following code segment. (Line numbers are included for reference only.)
01 private void FillOrderTable(int pageIndex) {
02 int pageSize = 5;
03
04 }
You need to fill the Order table with the next set of 5 records for each increase in the pageIndex value.
Which code segment should you insert at line 03?
A. string sql = "SELECT SalesOrderID, CustomerID, OrderDate FROM Sales.SalesOrderHeader";
daOrder.SelectCommand.CommandText = sql;
daOrder.Fill(orderDS, pageIndex, pageSize, "Order");
B. int startRecord = (pageIndex - 1) * pageSize;
string sql = "SELECT SalesOrderID, CustomerID, OrderDate FROM Sales.SalesOrderHeader";
daOrder.SelectCommand.CommandText = sql;
daOrder.Fill(orderDS, startRecord, pageSize, "Order");
C. string sql = string.Format("SELECT TOP {0} SalesOrderID, CustomerID,
OrderDate FROM Sales.SalesOrderHeader WHERE SalesOrderID > {1}", pageSize, pageIndex);
daOrder.SelectCommand.CommandText = sql;
daOrder.Fill(orderDS, "Order");
D. int startRecord = (pageIndex - 1) * pageSize;
string sql = string.Format("SELECT TOP {0} SalesOrderID, CustomerID,
OrderDate FROM Sales.SalesOrderHeader WHERE SalesOrderID > {1}",
pageSize, startRecord);
daOrder.SelectCommand.CommandText = sql;
daOrder.Fill(orderDS, "Order");
Answer: B

certification Microsoft   70-561 examen   70-561

NO.8 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You write the following code segment. (Line numbers are included for reference only.)
01 Using connection As New SqlConnection(connectionString)
02 Dim cmd As New SqlCommand(queryString, connection)
03 connection.Open()
04
05 While sdrdr.Read()
06 ' use the data in the reader
07 End While
08 End Using
You need to ensure that the memory is used efficiently when retrieving BLOBs from the database.
Which code segment should you insert at line 04?
A. Dim sdrdr As SqlDataReader = _ cmd.ExecuteReader()
B. Dim sdrdr As SqlDataReader = _ cmd.ExecuteReader(CommandBehavior.[Default])
C. Dim sdrdr As SqlDataReader = _ cmd.ExecuteReader(CommandBehavior.SchemaOnly)
D. Dim sdrdr As SqlDataReader = _ cmd.ExecuteReader(CommandBehavior.SequentialAccess)
Answer: D

Microsoft examen   70-561   70-561   70-561

NO.9 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a SqlDataAdapter object named daOrder. The SelectCommand property of the
daOrder object is set.
You write the following code segment. (Line numbers are included for reference only.)
01 private void ModifyDataAdapter() {
02
03 }
You need to ensure that the daOrder object can also handle updates.
Which code segment should you insert at line 02?
A. SqlCommandBuilder cb = new SqlCommandBuilder(daOrder);
cb.RefreshSchema();
B. SqlCommandBuilder cb = new SqlCommandBuilder(daOrder);
cb.SetAllValues = true;
C. SqlCommandBuilder cb = new SqlCommandBuilder(daOrder);
daOrder.DeleteCommand = cb.GetDeleteCommand();
daOrder.InsertCommand = cb.GetInsertCommand();
daOrder.UpdateCommand = cb.GetUpdateCommand();
D. SqlCommandBuilder cb = new SqlCommandBuilder(daOrder);
cb.RefreshSchema();
cb.GetDeleteCommand();
cb.GetInsertCommand();
cb.GetUpdateCommand();
Answer: C

Microsoft   70-561   70-561   70-561 examen   70-561 examen

NO.10 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a DataSet object named orderDS. The object contains a table named Order as
shown in the following exhibit.
The application uses a SqlDataAdapter object named daOrder to populate the Order table.
You write the following code segment. (Line numbers are included for reference only.)
01 Private Sub FillOrderTable(ByVal pageIndex As Integer)
02 Dim pageSize As Integer = 5
03
04 End Sub
You need to fill the Order table with the next set of 5 records for each increase in the pageIndex value.
Which code segment should you insert at line 03?
A. Dim sql As String = "SELECT SalesOrderID, CustomerID, " + _
"OrderDate FROM Sales.SalesOrderHeader"
daOrder.SelectCommand.CommandText = sql
daOrder.Fill(orderDS, pageIndex, pageSize, "Order")
B. Dim startRecord As Integer = (pageIndex - 1) * pageSize
Dim sql As String = "SELECT SalesOrderID, CustomerID, " + _
"OrderDate FROM Sales.SalesOrderHeader"
daOrder.SelectCommand.CommandText = sql
daOrder.Fill(orderDS, startRecord, pageSize, "Order")
C. Dim sql As String = _
String.Format("SELECT TOP {0} SalesOrderID, " + _
"CustomerID, OrderDate FROM Sales.SalesOrderHeader " + _
"WHERE SalesOrderID > {1}", pageSize, pageIndex)
daOrder.SelectCommand.CommandText = sql
daOrder.Fill(orderDS, "Order")
D. Dim startRecord As Integer = (pageIndex - 1) * pageSize
Dim sql As String = _
String.Format("SELECT TOP {0} SalesOrderID, " + _
"CustomerID, OrderDate FROM Sales.SalesOrderHeader " + _
"WHERE SalesOrderID > {1}", pageSize, startRecord)
daOrder.SelectCommand.CommandText = sql
daOrder.Fill(orderDS, "Order")
Answer: B

Microsoft examen   70-561 examen   70-561   certification 70-561

NO.11 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You need to separate the security-related exceptions from the other exceptions for database operations at
run time.
Which code segment should you use?
A. Catch ex As System.Security.SecurityException
'Handle all database security related exceptions.
End Try
B. Catch ex As System.Data.SqlClient.SqlException
For i As Integer = 0 To ex.Errors.Count - 1
If ex.Errors(i).[Class].ToString() = "14" Then
'Handle all database security related exceptions.
Else
'Handle other exceptions
End If
Next
End Try
C. Catch ex As System.Data.SqlClient.SqlException
For i As Integer = 0 To ex.Errors.Count - 1
If ex.Errors(i).Number = 14 Then
'Handle all database security related exceptions.
Else
'Handle other exceptions
End If
Next
End Try
D. Catch ex As System.Data.SqlClient.SqlException
For i As Integer = 0 To ex.Errors.Count - 1
If ex.Errors(i).Message.Contains("Security") Then
'Handle all database security related exceptions.
Else
'Handle other exceptions
End If
Next
End Try
Answer: B

Microsoft   70-561   70-561 examen   70-561   70-561

NO.12 {

NO.13 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You write the following code segment.
string query = "Select EmpNo, EmpName from dbo.Table_1;
select Name,Age from dbo.Table_2";
SqlCommand command = new SqlCommand(query, connection);
SqlDataReader reader = command.ExecuteReader();
You need to ensure that the application reads all the rows returned by the code segment.
Which code segment should you use?
A. while (reader.NextResult())
{
Console.WriteLine(String.Format("{0}, {1}",reader[0], reader[1]));
reader.Read();
}
B. while (reader.Read())
{
Console.WriteLine(String.Format("{0}, {1}",reader[0], reader[1]));
reader.NextResult();
}
C. while (reader.Read())
{
Console.WriteLine(String.Format("{0}, {1}",reader[0], reader[1]));
}
reader.NextResult();
while (reader.Read())
{
Console.WriteLine(String.Format("{0}, {1}",reader[0], reader[1]));
}
D. while (reader.NextResult())
{
Console.WriteLine(String.Format("{0}, {1}",reader[0], reader[1]));
}
reader.Read();
while (reader.NextResult())
{
Console.WriteLine(String.Format("{0}, {1}",reader[0], reader[1]));
}
Answer: C

certification Microsoft   70-561   70-561   70-561   70-561

NO.14 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You write the following code segment. (Line numbers are included for reference only.)
01 using (SqlConnection connection = new
SqlConnection(connectionString)) {
02 SqlCommand cmd = new SqlCommand(queryString, connection);
03 connection.Open();
04
05 while (sdrdr.Read()){
06 // use the data in the reader
07 }
08 }
You need to ensure that the memory is used efficiently when retrieving BLOBs from the database.
Which code segment should you insert at line 04?
A. SqlDataReader sdrdr = cmd.ExecuteReader();
B. SqlDataReader sdrdr = cmd.ExecuteReader(CommandBehavior.Default);
C. SqlDataReader sdrdr = cmd.ExecuteReader(CommandBehavior.SchemaOnly);
D. SqlDataReader sdrdr = cmd.ExecuteReader(CommandBehavior.SequentialAccess);
Answer: D

Microsoft   70-561   70-561 examen   certification 70-561   70-561

NO.15 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a DataSet object named OrderDS that has the Order and OrderDetail tables as
shown in the following exhibit.
You write the following code segment. (Line numbers are included for reference only.)
01 Private Sub GetOrders(ByVal cn As SqlConnection)
02 Dim cmd As SqlCommand = cn.CreateCommand()
03 cmd.CommandText = "Select * from [Order]; " + _
"Select * from [OrderDetail];"
04 Dim da As New SqlDataAdapter(cmd)
05
06 End Sub
You need to ensure that the Order and the OrderDetail tables are populated.
Which code segment should you insert at line 05?
A. da.Fill(OrderDS)
B. da.Fill(OrderDS.Order)
da.Fill(OrderDS.OrderDetail)
C. da.TableMappings.AddRange(New DataTableMapping() _
{New DataTableMapping("Table", "Order"), _
New DataTableMapping("Table1", "OrderDetail")})
da.Fill(OrderDS)
D. Dim mapOrder As New DataTableMapping()
mapOrder.DataSetTable = "Order"
Dim mapOrderDetail As New DataTableMapping()
mapOrder.DataSetTable = "OrderDetail"
da.TableMappings.AddRange(New DataTableMapping() _
{mapOrder, mapOrderDetail})
da.Fill(OrderDS)
Answer: C

Microsoft examen   70-561 examen   70-561   70-561

NO.16 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You write the following code segment.
Dim query As String = _ "Select EmpNo, EmpName from dbo.Table_1; " + _ "select Name,Age from
dbo.Table_2"
Dim command As New SqlCommand(query, connection)
Dim reader As SqlDataReader = command.ExecuteReader()
You need to ensure that the application reads all the rows returned by the code segment.
Which code segment should you use?
A. While reader.NextResult()
Console.WriteLine([String].Format("{0}, {1}", reader(0), reader(1)))
reader.Read()
End While
B. While reader.Read()
Console.WriteLine([String].Format("{0}, {1}", reader(0), reader(1)))
reader.NextResult()
End While
C. While reader.Read()
Console.WriteLine([String].Format("{0}, {1}", reader(0), reader(1)))
End While
reader.NextResult()
while reader.Read()
Console.WriteLine([String].Format("{0}, {1}", reader(0), reader(1)))
End While
D. While reader.NextResult()
Console.WriteLine([String].Format("{0}, {1}", reader(0), reader(1)))
End While
reader.Read()
while reader.NextResult()
Console.WriteLine([String].Format("{0}, {1}", reader(0), reader(1)))
End While
Answer: C

certification Microsoft   70-561 examen   70-561   70-561   70-561

NO.17 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
The connection string of the application is defined in the following manner.
"Server=Prod;Database=WingtipToys;Integrated
Security=SSPI;Asynchronous Processing=true"
The application contains the following code segment. (Line numbers are included for reference only.)
01 Protected Sub UpdateData(ByVal cmd As SqlCommand)
02 cmd.Connection.Open()
03
04 lblResult.Text = "Updating ..."
05 End Sub
The cmd object takes a long time to execute.
You need to ensure that the application continues to execute while cmd is executing.
What should you do?
A. Insert the following code segment at line 03.
cmd.BeginExecuteNonQuery(New AsyncCallback( _
AddressOf UpdateComplete), cmd)
Add the following code segment.
Private Sub UpdateComplete (ByVal ar As IAsyncResult)
Dim count As Integer = CInt(ar.AsyncState)
LogResults(count)
End Sub
B. Insert the following code segment at line 03.
cmd.BeginExecuteNonQuery(New AsyncCallback( _
AddressOf UpdateComplete), cmd)
Add the following code segment.
Private Sub UpdateComplete(ByVal ar As IAsyncResult)
Dim cmd As SqlCommand = DirectCast(ar.AsyncState, SqlCommand)
Dim count As Integer = cmd.EndExecuteNonQuery(ar)
LogResults(count)
End Sub
C. Insert the following code segment at line 03.
AddHandler cmd.StatementCompleted, AddressOf UpdateComplete
cmd.ExecuteNonQuery()
Add the following code segment.
Private Sub UpdateComplete(ByVal sender As Object, _
ByVal e As StatementCompletedEventArgs)
Dim count As Integer = e.RecordCount
LogResults(count)
End Sub
D. Insert the following code segment at line 03.
Dim notification As New _
SqlNotificationRequest("UpdateComplete ", "", 10000)
cmd.Notification = notification
cmd.ExecuteNonQuery()
Add the following code segment.
Private Sub UpdateComplete (ByVal notice As SqlNotificationRequest)
Dim count As Integer = Integer.Parse(notice.UserData)
LogResults(count)
End Sub
Answer: B

Microsoft   70-561   70-561   70-561   70-561 examen   certification 70-561

NO.18 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You write the following code segment.
Dim queryString As String = "Select Name, Age from dbo.Table_1"
Dim command As New _SqlCommand(queryString, DirectCast(connection, SqlConnection))
You need to get the value that is contained in the first column of the first row of the result set returned by
the query.
Which code segment should you use?
A. Dim value As Object = command.ExecuteScalar()
Dim requiredValue As String = value.ToString()
B. Dim value As Integer = command.ExecuteNonQuery()
Dim requiredValue As String = value.ToString()
C. Dim value As SqlDataReader = _command.ExecuteReader(CommandBehavior.SingleRow)
Dim requiredValue As String = value(0).ToString()
D. Dim value As SqlDataReader = _command.ExecuteReader(CommandBehavior.SingleRow)
Dim requiredValue As String = value(1).ToString()
Answer: A

Microsoft examen   70-561   certification 70-561   70-561 examen   70-561 examen   70-561

NO.19 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
The application analyzes large amounts of transaction data that are stored in a different database.
You write the following code segment. (Line numbers are included for reference only.)
01 Using connection As New SqlConnection(sourceConnectionString)
02 Using connection2 As _
New SqlConnection(destinationConnectionString)
03 Using command As New SqlCommand()
04 connection.Open()
05 connection2.Open()
06 Using reader As SqlDataReader = command.ExecuteReader()
07 Using bulkCopy As New SqlBulkCopy(connection2)
08
09 End Using
10 End Using
11 End Using
12 End Using
13 End Using
You need to copy the transaction data to the database of the application.
Which code segment should you insert at line 08?
A. reader.Read()
bulkCopy.WriteToServer(reader)
B. bulkCopy.DestinationTableName = "Transactions"
bulkCopy.WriteToServer(reader)
C. bulkCopy.DestinationTableName = "Transactions"
AddHandler bulkCopy.SqlRowsCopied, _
AddressOf bulkCopy_SqlRowsCopied
D. While reader.Read()
bulkCopy.WriteToServer(reader)
End While
Answer: B

Microsoft   70-561   70-561   70-561   70-561 examen

NO.20 myConnection.Close();

NO.21 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application has a DataTable object named OrderDetailTable. The object has the following columns:
ID
OrderID
ProductID
Quantity
LineTotal
The OrderDetailTable object is populated with data provided by a business partner. Some of the records
contain a null value in the LineTotal field and 0 in the Quantity field.
You write the following code segment. (Line numbers are included for reference only.)
01 Dim col As New DataColumn("UnitPrice", GetType(Decimal))
02
03 OrderDetailTable.Columns.Add(col)
You need to add a DataColumn named UnitPrice to the OrderDetailTable object.
Which line of code should you insert at line 02?
A. col.Expression = "LineTotal/Quantity"
B. col.Expression = "LineTotal/ISNULL(Quantity, 1)"
C. col.Expression = "LineTotal.Value/ISNULL(Quantity.Value, 1)"
D. col.Expression = "iif(Quantity > 0, LineTotal/Quantity, 0)"
Answer: D

Microsoft examen   70-561 examen   70-561   70-561   certification 70-561

NO.22 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
You need to ensure that the application can connect to any type of database.
What should you do?
A. Set the database driver name in the connection string of the application, and then create the
connection object in the following manner.
Dim connection As DbConnection = _ New OdbcConnection(connectionString)
B. Set the database provider name in the connection string of the application, and then create the
connection object in the following manner.
Dim connection As DbConnection = _ New OleDbConnection(connectionString)
C. Create the connection object in the following manner.
Dim factory As DbProviderFactory = _ DbProviderFactories.GetFactory("System.Data.Odbc")
Dim connection As DbConnection = _ factory.CreateConnection()
D. Create the connection object in the following manner.
Dim factory As DbProviderFactory = _ DbProviderFactories.GetFactory(databaseProviderName)
Dim connection As DbConnection = factory.CreateConnection()
Answer: D

certification Microsoft   70-561 examen   certification 70-561   70-561 examen   70-561

NO.23 }
You need to compute the total number of records processed by the Select queries in the RecordCount
variable.
Which code segment should you insert at line 16?
A. myReader = myCommand.ExecuteReader();
RecordCount = myReader.RecordsAffected;
B. while (myReader.Read())
{
//Write logic to process data for the first result.
}
RecordCount = myReader.RecordsAffected;
C. while (myReader.HasRows)
{
while (myReader.Read())
{
//Write logic to process data for the second result.
RecordCount = RecordCount + 1;
myReader.NextResult();
}
}
D. while (myReader.HasRows)
{
while (myReader.Read())
{
//Write logic to process data for the second result.
RecordCount = RecordCount + 1;
}
myReader.NextResult();
}
Answer: D

certification Microsoft   70-561   70-561   70-561 examen   certification 70-561
22. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application uses Microsoft SQL Server 2005.
You write the following code segment. (Line numbers are included for reference only.)
01 Dim myConnString As String = _
02 "User ID=<username>;password=<strong password>;" + _
03 "Initial Catalog=pubs;Data Source=myServer"
04 Dim myConnection As New SqlConnection(myConnString)
05 Dim myCommand As New SqlCommand()
06 Dim myReader As DbDataReader
07 myCommand.CommandType = CommandType.Text
08 myCommand.Connection = myConnection
09 myCommand.CommandText = _
10 "Select * from Table1;Select * from Table2;"
11 Dim RecordCount As Integer = 0
12 Try
13 myConnection.Open()
14
15 Catch ex As Exception
16 Finally
17 myConnection.Close()
18 End Try
You need to compute the total number of records processed by the Select queries in the RecordCount
variable.
Which code segment should you insert at line 14?
A. myReader = myCommand.ExecuteReader()
RecordCount = myReader.RecordsAffected
B. While myReader.Read()
'Write logic to process data for the first result.
End While
RecordCount = myReader.RecordsAffected
C. While myReader.HasRows
While myReader.Read()
'Write logic to process data for the second result.
RecordCount = RecordCount + 1
myReader.NextResult()
End While
End While
D. While myReader.HasRows
While myReader.Read()
'Write logic to process data for the second result.
RecordCount = RecordCount + 1
End While
myReader.NextResult()
End While
Answer: D

Microsoft   70-561   70-561   70-561   70-561 examen   certification 70-561
23. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application uses data from a Microsoft SQL Server 2005 database table. A Web page of the
application contains a GridView server control.
You write the following code segment. (Line numbers are included for reference only.)
01 private void LoadGrid()
02 {
03 using (SqlCommand command = new SqlCommand())
04 {
05 command.Connection = connection;
06 command.CommandText = "SELECT * FROM Customers";
07 connection.Open();
08
09 }
10 }
You need to retrieve the data from the database table and bind the data to the DataSource property of the
GridView server control.
Which code segment should you insert at line 08?
A. SqlDataReader rdr = command.ExecuteReader();
connection.Close();
GridView1.DataSource = rdr;
GridView1.DataBind();
B. SqlDataReader rdr = command.ExecuteReader();
GridView1.DataSource = rdr.Read();
GridView1.DataBind();
connection.Close();
C. SqlDataReader rdr = command.ExecuteReader();
Object[] values = new Object[rdr.FieldCount];
GridView1.DataSource = rdr.GetValues(values);
GridView1.DataBind();
connection.Close();
D. DataTable dt = new DataTable();
using (SqlDataReader reader = command.ExecuteReader())
{
dt.Load(reader);
}
connection.Close();
GridView1.DataSource = dt;
GridView1.DataBind();
Answer: D

Microsoft examen   70-561 examen   70-561   70-561 examen
24. You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application uses data from a Microsoft SQL Server 2005 database table. A Web page of the
application contains a GridView server control.
You write the following code segment. (Line numbers are included for reference only.)
01 Private Sub LoadGrid()
02 Using command As New SqlCommand()
03 command.Connection = connection
04 command.CommandText = "SELECT * FROM Customers"
05 connection.Open()
06
07 End Using
08 End Sub
You need to retrieve the data from the database table and bind the data to the DataSource property of the
GridView server control.
Which code segment should you insert at line 06?
A. Dim rdr As SqlDataReader = command.ExecuteReader()
connection.Close()
GridView1.DataSource = rdr
GridView1.DataBind()
B. Dim rdr As SqlDataReader = command.ExecuteReader()
GridView1.DataSource = rdr.Read()
GridView1.DataBind()
connection.Close()
C. Dim rdr As SqlDataReader = command.ExecuteReader()
Dim values As Object() = New Object(rdr.FieldCount - 1) {}
GridView1.DataSource = rdr.GetValues(values)
GridView1.DataBind()
D. Dim dt As New DataTable()
Using reader As SqlDataReader = command.ExecuteReader()
dt.Load(reader)
End Using
connection.Close()
GridView1.DataSource = dt
GridView1.DataBind()
Answer: D

Microsoft   70-561   70-561 examen   70-561

NO.24 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a SqlDataAdapter object named daOrder. The SelectCommand property of the
daOrder object is set.
You write the following code segment. (Line numbers are included for reference only.)
01 Private Sub ModifyDataAdapter()
02
03 End Sub
You need to ensure that the daOrder object can also handle updates.
Which code segment should you insert at line 02?
A. Dim cb As New SqlCommandBuilder(daOrder)
cb.RefreshSchema()
B. Dim cb As New SqlCommandBuilder(daOrder)
cb.SetAllValues = True
C. Dim cb As New SqlCommandBuilder(daOrder)
daOrder.DeleteCommand = cb.GetDeleteCommand()
daOrder.InsertCommand = cb.GetInsertCommand()
daOrder.UpdateCommand = cb.GetUpdateCommand()
D. Dim cb As New SqlCommandBuilder(daOrder)
cb.RefreshSchema()
cb.GetDeleteCommand()
cb.GetInsertCommand()
cb.GetUpdateCommand()
Answer: C

certification Microsoft   70-561 examen   70-561 examen   70-561   certification 70-561

NO.25 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a DataSet object named OrderDS that has the Order and OrderDetail tables as
shown in the following exhibit.
You write the following code segment. (Line numbers are included for reference only.)
01 private void GetOrders(SqlDataConnection cn) {
02 SqlCommand cmd = cn.CreateCommand();
03 cmd.CommandText = "Select * from [Order];
Select * from [OrderDetail];";
04 SqlDataAdapter da = new SqlDataAdapter(cmd);
05
06 }
You need to ensure that the Order and the OrderDetail tables are populated.
Which code segment should you insert at line 05?
A. da.Fill(OrderDS);
B. da.Fill(OrderDS.Order);
da.Fill(OrderDS.OrderDetail);
C. da.TableMappings.AddRange(new DataTableMapping[] {
new DataTableMapping("Table", "Order"),
new DataTableMapping("Table1", "OrderDetail")});
da.Fill(OrderDS);
D. DataTableMapping mapOrder = new DataTableMapping();
mapOrder.DataSetTable = "Order";
DataTableMapping mapOrderDetail = new DataTableMapping();
mapOrder.DataSetTable = "OrderDetail";
da.TableMappings.AddRange(new DataTableMapping[]
{ mapOrder, mapOrderDetail });
Da.Fill(OrderDS);
Answer: C

Microsoft   certification 70-561   certification 70-561   70-561   70-561

NO.26 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application contains a TextBox control named txtProductID. The application will return a list of active
products that have the ProductID field equal to the txtProductID.Text property.
You write the following code segment. (Line numbers are included for reference only.)
01 Private Function GetProducts(ByVal cn _
As SqlConnection) As DataSet
02 Dim cmd As New SqlCommand()
03 cmd.Connection = cn
04 Dim da As New SqlDataAdapter(cmd)
05 Dim ds As New DataSet()
06
07 da.Fill(ds)
08 Return ds
09 End Function
You need to populate the DataSet object with product records while avoiding possible SQL injection
attacks.
Which code segment should you insert at line 06?
A. cmd.CommandText = _
String.Format("sp_sqlexec 'SELECT ProductID, " + _
"Name FROM Product WHERE ProductID={0} AND IsActive=1'", _
txtProductID.Text)
B. cmd.CommandText = _
String.Format("SELECT ProductID, " + _
"Name FROM Product WHERE ProductID={0} AND IsActive=1", _
txtProductID.Text)
cmd.Prepare()
C. cmd.CommandText = _
String.Format("SELECT ProductID, " + _
"Name FROM Product WHERE ProductID={0} AND IsActive=1", _
txtProductID.Text)
cmd.CommandType = CommandType.TableDirect
D. cmd.CommandText = "SELECT ProductID, " + _
"Name FROM Product WHERE ProductID=@productID AND IsActive=1"
cmd.Parameters.AddWithValue("@productID", txtProductID.Text)
Answer: D

Microsoft examen   70-561   certification 70-561

NO.27 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
The application has a DataTable object named OrderDetailTable. The object has the following columns:
ID
OrderID
ProductID
Quantity
LineTotal
The OrderDetailTable object is populated with data provided by a business partner. Some of the records
contain a null value in the LineTotal field and 0 in the Quantity field.
You write the following code segment. (Line numbers are included for reference only.)
01 DataColumn col = new DataColumn("UnitPrice", typeof(decimal));
02
03 OrderDetailTable.Columns.Add(col);
You need to add a DataColumn named UnitPrice to the OrderDetailTable object.
Which line of code should you insert at line 02?
A. col.Expression = "LineTotal/Quantity";
B. col.Expression = "LineTotal/ISNULL(Quantity, 1)";
C. col.Expression = "LineTotal.Value/ISNULL(Quantity.Value,1)";
D. col.Expression = "iif(Quantity > 0, LineTotal/Quantity, 0)";
Answer: D

Microsoft   70-561 examen   70-561   70-561 examen   70-561

NO.28 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
The application throws an exception when the SQL Connection object is used.
You need to handle the exception.
Which code segment should you use?
A. try
{
if(null!=conn)
conn.Close();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null==conn)
conn.Open();
}
B. try
{
conn.Close();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null!=conn)
conn.Open();
}
C. try
{
conn.Open();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null!=conn)
conn.Close();
}
D. try
{
conn.Open();
// code for the query
}
catch (Exception ex)
{
// handle exception
}
finally
{
if(null==conn)
conn.Close();
}
Answer: C

Microsoft   70-561 examen   70-561 examen

NO.29 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET.
You need to ensure that the application can connect to any type of database.
What should you do?
A. Set the database driver name in the connection string of the application, and then create the
connection object in the following manner.
DbConnection connection = new OdbcConnection(connectionString);
B. Set the database provider name in the connection string of the application, and then create the
connection object in the following manner.
DbConnection connection = new OleDbConnection(connectionString);
C. Create the connection object in the following manner.
DbProviderFactory factory = DbProviderFactories.GetFactory("System.Data.Odbc");
DbConnection connection = factory.CreateConnection();
D. Create the connection object in the following manner.
DbProviderFactory factory = DbProviderFactories.GetFactory(databaseProviderName);
DbConnection connection = factory.CreateConnection();
Answer: D

Microsoft   certification 70-561   certification 70-561   70-561 examen

NO.30 You create an application by using the Microsoft .NET Framework 3.5 and Microsoft ADO.NET. The
application connects to a Microsoft SQL Server 2005 database.
You write the following code segment.
string queryString = "Select Name, Age from dbo.Table_1";
SqlCommand command = new SqlCommand(queryString, (SqlConnection)connection));
You need to get the value that is contained in the first column of the first row of the result set returned by
the query.
Which code segment should you use?
A. var value = command.ExecuteScalar();
string requiredValue = value.ToString();
B. var value = command.ExecuteNonQuery();
string requiredValue = value.ToString();
C. var value = command.ExecuteReader(CommandBehavior.SingleRow);
string requiredValue = value[0].ToString();
D. var value = command.ExecuteReader(CommandBehavior.SingleRow);
string requiredValue = value[1].ToString();
Answer: A

Microsoft examen   70-561   70-561 examen   70-561   certification 70-561

Certification Microsoft de téléchargement gratuit pratique d'examen 070-648 070-647 070-643 070-642 070-640 070-622, questions et réponses

Dans n'importe quelle industrie, tout le monde espère une meilleure occasion de se promouvoir, surtout dans l'industrie de IT. Les professionnelles dans l'industrie IT ont envie d'une plus grande space de se développer. Le Certificat Microsoft 070-648 070-647 070-643 070-642 070-640 070-622 peut réaliser ce rêve. Et Pass4Test peut vous aider à réussir le test Microsoft 070-648 070-647 070-643 070-642 070-640 070-622.


Ajoutez le produit de Pass4Test au panier, vous pouvez participer le test avec une 100% confiance. Bénéficiez du succès de test Microsoft 070-648 070-647 070-643 070-642 070-640 070-622 par une seule fois, vous n'aurez pas aucune raison à refuser.


Pass4Test a une équipe se composant des experts qui font la recherche particulièrement des exercices et des Q&As pour le test certification Microsoft 070-648 070-647 070-643 070-642 070-640 070-622, d'ailleurs ils peuvent vous proposer à propos de choisir l'outil de se former en ligne. Si vous avez envie d'acheter une Q&A de Pass4Test, Pass4Test vous offrira de matériaux plus détailés et plus nouveaux pour vous aider à approcher au maximum le test réel. Assurez-vous de choisir le Pass4Test, vous réussirez 100% le test Microsoft 070-648 070-647 070-643 070-642 070-640 070-622.


Code d'Examen: 070-648

Nom d'Examen: Microsoft (TS: Upgrading MCSA on Windows serv 2003 to Windows Serv 2008)

Questions et réponses: 428 Q&As

Code d'Examen: 070-647

Nom d'Examen: Microsoft (Windows Server 2008,Enterprise Administrator)

Questions et réponses: 496 Q&As

Code d'Examen: 070-643

Nom d'Examen: Microsoft (Windows Server 2008 Applications Infrastructure, Configuring)

Questions et réponses: 363 Q&As

Code d'Examen: 070-642

Nom d'Examen: Microsoft (TS: Windows Server 2008 Network Infrastructure, Configuring Certification )

Questions et réponses: 350 Q&As

Code d'Examen: 070-640

Nom d'Examen: Microsoft (Windows Server 2008 Active Directory. Configuring)

Questions et réponses: 490 Q&As

Code d'Examen: 070-622

Nom d'Examen: Microsoft (Pro:Microsoft Desktop Support - Enterprise.)

Questions et réponses: 215 Q&As

Le Pass4Test est un site qui peut offrir les facilités aux candidats et aider les candidats à réaliser leurs rêve. Si vous êtes souci de votre test Certification, Pass4Test peut vous rendre heureux. La haute précision et la grande couverture de la Q&A de Pass4Test vous aidera pendant la préparation de test. Vous n'aurez aucune raison de regretter parce que Pass4Test réalisera votre rêve.


Pass4Test peut offrir la facilité aux candidats qui préparent le test Microsoft 070-648 070-647 070-643 070-642 070-640 070-622. Nombreux de candidats choisissent le Pass4Test à préparer le test et réussir finalement à la première fois. Les experts de Pass4Test sont expérimentés et spécialistes. Ils profitent leurs expériences riches et connaissances professionnelles à rechercher la Q&A Microsoft 070-648 070-647 070-643 070-642 070-640 070-622 selon le résumé de test réel Microsoft 070-648 070-647 070-643 070-642 070-640 070-622. Vous pouvez réussir le test à la première fois sans aucune doute.


070-643 Démo gratuit à télécharger: http://www.pass4test.fr/070-643.html


NO.1 Your company has an Active Directory domain. The Terminal Services role is installed on a member
server named TS01. The Terminal Services Licensing role service is installed on a new test server named
TS10 in a workgroup.
You cannot enable the Terminal Services Per User Client Access License (TS Per User CAL) mode in the
Terminal Services Licensing role service on TS10.
You need to ensure that you can use TS Per User CAL mode on TS10.
What should you do?
A. Join TS10 to the domain.
B. Disjoin TS01 from the domain.
C. Extend the schema to add attributes for Terminal Services Licensing.
D. Create a Group Policy object (GPO) that configures TS01 to use TS10 for licensing.
Answer: A

Microsoft   070-643   070-643 examen   070-643

NO.2 You have four Remote Desktop Session Host Servers that run Windows Server 2008 R2. The Remote
Desktop Session Host Servers are named Server1, Server2, Server3, and Server4. You install the
Remote Desktop Connection Broker role service on Server1. You need to configure load balancing for the
four Remote Desktop Session Host Servers. You must ensure that Server2 is the preferred server for
Remote Desktop Services sessions.
Which tool should you use?
A. Group Policy Management
B. Remote Desktop Session Host Configuration
C. Remote Desktop Connection Manager
D. RD Gateway Manager
Answer: B

Microsoft   070-643   070-643 examen   070-643

NO.3 You have a server that runs Windows Server 2008 R2. The server has the RD Gateway role service
installed.
You need to provide a security group access to the RD Gateway server.
What should you do.?
A. Add the security group to the Remote Desktop Users group.
B. Add the security group to the TS Web Access Computers group.
C. Create and configure a Remote Desktop Resource Authorization Policy.
D. Create and configure a Remote Desktop Connection Authorization Policy.
Answer: D

Microsoft   070-643 examen   070-643   070-643 examen

NO.4 You manage a server that runs Windows Server 2008. The server has the Web Server (IIS) role
installed. The server hosts an Internet-accessible Web site that has a virtual directory named /orders/. A
Web server certificate is installed and an SSL listener has been configured for the Web site.
The /orders/ virtual directory must meet the following company policy requirements:
Be accessible to authenticated users only.
Allow authentication types to support all browsers.
Encrypt all authentication traffic by using HTTPS.
All other directories of the Web site must be accessible to anonymous users and be available without SSL
You need to configure the /orders/ virtual directory to meet the company policy requirements.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Configure the Web site to the Require SSL setting.
B. Configure the /orders/ virtual directory to the Require SSL setting.
C. Configure the Digest Authentication setting to Enabled for the /orders/ virtual directory.
D. Configure the Basic Authentication setting to Enabled and the Anonymous Authentication setting to
Disabled for the Web site.
E. Configure the Basic Authentication setting to Enabled and the Anonymous Authentication setting to
Disabled for the / orders/ virtual directory.
Answer: BE

Microsoft examen   070-643 examen   070-643   070-643

NO.5 You have a Windows Server 2008 R2 server that has the Web Server (IIS) server role installed. The
server contains a Web site.
You need to ensure that the cookies sent from the Web site are encrypted on users' computers.
Which Web site feature should you configure?
A. Authorization Rules
B. Machine Key
C. Pages And Controls
D. SSL Settings
Answer: B

Microsoft examen   070-643 examen   070-643   certification 070-643   070-643

NO.6 Your network consists of a single Active Directory domain. The domain contains a server that runs
Windows Server 2008 R2. The server has Microsoft SharePoint Foundation 2010 installed. You need to
allow users to create distribution lists from a SharePoint site. What should you do on the SharePoint
Foundation 2010 server?
A. Set the outgoing mail character set to 1200(Unicode).
B. Enable the SharePoint Directory Management Service.
C. Configure the site to accept messages from authenticated users only.
D. Configure the site to use the default Rights Management server in Active Directory Domain Services.
Answer: B

Microsoft examen   070-643 examen   certification 070-643   070-643

NO.7 A server named Server2 runs Windows Server 2008 R2. The Remote Desktop Services server role is
installed on Server2.
You plan to deploy an application on Server2. The application vendor confirms that the application can be
deployed in a Remote Desktop Services environment. The application does not use Microsoft Windows
Installer packages for installation. The application makes changes to the current user registry during
installation.
You need to install the application to support multiple user sessions.
What should you do?
A. Run the mstsc /v:Server2 /admin command from the client computer to log on to Server2. Install the
application.
B. Run the change user /execute command on Server2. Install the application and run the change user
/install command on Server2.
C. Run the change user /install command on Server2. Install the application and run the change user
/execute command on Server2.
D. Run the change logon /disable command on Server2. Install the application and run the change logon
/enable command on Server2.
Answer: C

Microsoft   070-643 examen   certification 070-643   certification 070-643   070-643

NO.8 Your network contains a Windows Server 2008 R2 server that has the Web Server (IIS) server role
installed.
You have a Web application that uses a custom application pool. The application pool is set to recycle
every 1,440 minutes. The Web application does not support multiple worker processes. You need to
configure the application pool to ensure that users can access the Web application after the application
pool is recycled.
What should you do?
A. Set the Shutdown Executable option to True.
B. Set the Process Orphaning Enabled option to True.
C. Set the Disable Overlapped Recycle option to True.
D. Set the Disable Recycling for Configuration Changes option to True.
Answer: C

Microsoft   070-643 examen   070-643   certification 070-643   070-643

NO.9 You have a server that runs Windows Server 2008 R2. The server has Microsoft SharePoint Foundation
2010 installed. The server is configured to accept incoming e-mail.
You create a new document library.
You need to ensure that any user can send e-mail to the document library.
What should you do?
A. Modify the RSS setting for the document library.
B. Modify the permissions for the document library.
C. Modify the incoming e-mail settings for the document library.
D. Enable anonymous authentication for the Web application.
Answer: C

Microsoft   certification 070-643   certification 070-643   070-643

NO.10 You manage a member server that runs Windows Server 2008 R2. The server runs the Remote
Desktop Gateway (RD Gateway) role service.
You need to find out whether a user named User1 has ever connected to his office workstation through
the RD Gateway server.
What should you do?
A. View the events in the Monitoring folder from the RD Gateway Manager console.
B. View the Event Viewer Security log.
C. View the Event Viewer Application log.
D. View the Event Viewer Terminal Services-Gateway log.
Answer: D

certification Microsoft   070-643   070-643   070-643 examen

NO.11 Your company has a server that runs Windows Server 2008 R2. The server has the Web Server (IIS)
role installed.
You need to activate SSL for the default Web site.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Obtain and import a server certificate by using the IIS Manager console.
B. Select the Generate Key option in the Machine Key dialog box for the default Web site.
C. Add bindings for the HTTPS protocol to the default Web site by using the IIS Manager console.
D. Install the Digest Authentication component for the Web server role by using the Server Manager
console.
Answer: A, C

Microsoft   070-643   070-643   070-643

NO.12 You install the Windows Deployment Services (WDS) role on a server that runs Windows Server 2008
R2.
You plan to install Windows 7 on a computer that does not support Preboot Execution Environment (PXE).
You have a Windows 7 image that is stored on the WDS server. You need to start the computer and install
the image that is stored on the WDS server.
What should you create?
A. a capture image
B. a CD-ROM that contains PXE drivers
C. a discover image
D. an install image
Answer: C

Microsoft   070-643   070-643 examen

NO.13 A server runs Windows Server 2008. The Terminal Services role is installed on the server.
You deploy a new application on the server. The application creates files that have an extension of .xyz.
You need to ensure that users can launch the remote application from their computers by double-clicking
a file that has the .xyz extension.
What should you do?
A. Configure the Remote Desktop Connection Client on the users' computers to point to the server.
B. Configure the application as a published application by using a Remote Desktop Program file.
C. Configure the application as a published application by using a Windows Installer package file.
D. Configure the application as a published application by using a Terminal Server Web Access Web site.
Answer: C

Microsoft   070-643   certification 070-643

NO.14 You have a Windows Server 2008 R2 server that has the Web Server (IIS) server role installed. The
server hosts multiple Web sites.
You need to configure the server to automatically release memory for a single Web site. You must achieve
this goal without affecting the other Web sites.
What should you do?
A. Create a new Web site and edit the bindings for the Web site.
B. Create a new application pool and associate the Web site to the application pool.
C. Create a new virtual directory and modify the Physical Path Credentials on the virtual directory.
D. From the Application Pool Defaults, modify the Recycling options.
Answer: B

Microsoft examen   070-643 examen   070-643 examen   070-643 examen

NO.15 You manage a server that runs Windows Server 2008 R2. The Remote Desktop Services server role is
installed on the server.
A Remote Desktop Services application runs on the server. Users report that the application stops
responding.
You monitor the memory usage on the server for a week. You discover that the application has a memory
leak.
A patch is not currently available. You create a new resource-allocation policy in Windows System
Resource Manager (WSRM). You configure a Process Matching Criteria named TrackShip and select the
application. You need to terminate the application when the application consumes more than half of the
available memory on the server.
What should you do?
A. Configure the resource-allocation policy and set the maximum working set limit option to half the
available memory on the server. Set the new policy as a Profiling Policy.
B. Configure the resource-allocation policy and set the maximum working set limit option to half the
available memory on the server. Set the new policy as a Managing Policy.
C. Configure the resource-allocation policy and set the maximum committed memory option to half the
available memory on the server. Set the new policy as a Profiling Policy.
D. Configure the resource-allocation policy and set the maximum committed memory option to half the
available memory on the server. Set the new policy as a Managing Policy.
Answer: D

Microsoft   070-643 examen   certification 070-643   070-643

NO.16 Your company has an Active Directory domain. You have a server named KMS1 that runs Windows
Server 2008 R2. You install and configure Key Management Service (KMS) on KMS1. You plan to deploy
Windows Server 2008 R2 on 10 new servers. You install the first two servers. The servers fail to activate
by using KMS1.
You need to activate the new servers by using the KMS server.
What should you do first?
A. Complete the installation of the remaining eight servers.
B. Configure Windows Management Instrumentation (WMI) exceptions in Windows Firewall on the new
servers.
C. Install Volume Activation Management Tool (VAMT) on the KMS server and configure Multiple
Activation Key (MAK) Proxy Activation.
D. Install Volume Activation Management Tool (VAMT) on the KMS server and configure Multiple
Activation Key (MAK) Independent Activation.
Answer: A

certification Microsoft   certification 070-643   070-643 examen   070-643 examen   070-643 examen

NO.17 Your company has an Active Directory domain. All the servers in the company run either Windows
Server 2008 R2 or Windows Server 2003. A Windows Server 2003 server named Server1 runs Microsoft
SQL Server 2005 SP2 and Microsoft Windows SharePoint Services (WSS) 2.0. The company plans to
migrate to WSS 3.0 SP2 on a Windows Server 2008 R2 server named Server2. You need to migrate the
configuration and content from Server1 to Server2.
What should you do?
A. Back up the SharePoint configuration and content from Server1. Install WSS 3.0 SP2 on Server2.
Restore the backup from Server1 to Server2.
B. Upgrade Server1 to Windows Server 2008 R2. Back up the SharePoint configuration and content from
Server1. Install WSS 3.0 SP2 on Server2. Restore the backup from Server1 to Server2.
C. Back up the SQL Server 2005 configuration and the WSS 2.0 databases from Server1. Install SQL
Server 2005 on Server2. Restore the SQL Server 2005 backup from Server1 to Server2.
D. Back up the WSS 2.0 configuration and content from Server1. Install WSS 2.0 on Server2. Restore the
backup from Server1 to Server2. Perform an in-place upgrade of WSS 2.0 to WSS 3.0 SP2 on Server2.
Answer: D

Microsoft   certification 070-643   070-643 examen

NO.18 You manage a member server that runs Windows Server 2008 R2. The server has the Web Server (IIS)
role installed.
The Web server hosts a Web site named Intranet1. Only internal Active Directory user accounts have
access to the Web site.
The authentication settings for Intranet1 are configured as shown in the exhibit. (Click the Exhibit button.)
You need to ensure that users authenticate to the Web site by using only the Microsoft Challenge
Handshake Authentication Protocol version 2 (MS-CHAPv2) encrypted Active Directory credentials.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Add the Digest Authentication role service and the URL Authorization role service to the server.
B. Add the Windows Authentication role service to IIS. Configure the Windows Authentication setting to
Enabled in the Intranet1 properties.
C. Configure the Basic Authentication setting to Disabled in the Intranet1 properties.
D. Configure the Default domain field for the Basic Authentication settings on Intranet1 by adding the
name of the Active Directory domain.
E. Configure the Basic Authentication setting to Disabled and the Anonymous Authentication setting to
Enabled in the Intranet1 properties.
Answer: B, C

Microsoft examen   certification 070-643   070-643   070-643 examen   070-643 examen

NO.19 Your company uses Public folders and Web Distributed Authoring and Versioning. The company asks
you to install Microsoft Windows SharePoint Services (WSS) as a server in a new server farm. You plan to
install WSS on a server that runs Windows Server 2008 R2.
You start the Configuration Wizard to begin the installation. You receive an error message as shown in the
exhibit.
You need to configure WSS to start SharePoint Services 3.0 SP 2 Central Administration.
What should you do?
A. Install the Windows Internal Database.
B. Install a Microsoft SQL Server 2005 server.
C. Install the Active Directory Rights Management Services role.
D. Install the Active Directory Lightweight Directory Services role.
Answer: B

Microsoft   070-643   070-643

NO.20 Your company has an Active Directory domain. A server named Server2 runs Windows Server 2008
R2. All client computers run Windows 7.
You install the Remote Desktop Services server role, RD Web Access role service, and RD Gateway role
service on Server2.
You need to ensure that all client computers have compliant firewall, antivirus software, and antispyware.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Configure Network Access Protection (NAP) on a server in the domain.
B. Add the Remote Desktop Services servers to the Windows Authorization Access domain local security
group.
C. Add the Remote Desktop Services client computers to the Windows Authorization Access domain local
security group.
D. Enable the Request clients to send a statement of health option in the Remote Desktop client access
policy.
Answer: A, D

Microsoft   070-643   certification 070-643   certification 070-643   certification 070-643   070-643

Microsoft meilleur examen 70-512 70-506 70-515 70-513 70-516 70-511 070-668, questions et réponses

Les produits de Pass4Test sont préparés pour le test Certification Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668, y compris les formations et les informations ciblées au test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668. D'ailleurs, la Q&A de Pass4Test qui est impressionnée par la grande couverture des questions et la haute précision des réponses vous permet à réussir le test avec une haute note.


On peut voir que beaucoup de candidats ratent le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668 quand même avec l'effort et beaucoup de temps dépensés. Cest une bonne preuve que le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668 est difficile à réussir. Pass4Test offre le guide d'étude bien fiable. Sauf le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668, Pass4Test peut offrir les Q&As des autres test Certification IT.


Beaucoup de gens trouvent difficile à passer le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668, c'est juste parce que ils n'ont pas bien choisi une bonne Q&A. Vous penserez que le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668 n'est pas du tout autant dur que l'imaginer. Le produit de Pass4Test non seulement comprend les Q&As qui sont impressionnées par sa grande couverture des Questions, mais aussi le service en ligne et le service après vendre.


Dépenser assez de temps et d'argent pour réussir le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668 ne peut pas vous assurer à passer le test Microsoft 70-512 70-506 70-515 70-513 70-516 70-511 070-668 sans aucune doute. Choisissez le Pass4Test, moins d'argent coûtés mais plus sûr pour le succès de test. Dans cette société, le temps est tellement précieux que vous devez choisir un bon site à vous aider. Choisir le Pass4Test symbole le succès dans le future.


Code d'Examen: 70-512

Nom d'Examen: Microsoft (TS Visual Studio Team Foundation Server 2010)

Questions et réponses: 72 Q&As

Code d'Examen: 70-506

Nom d'Examen: Microsoft (Microsoft Silverlight 4, Development)

Questions et réponses: 153 Q&As

Code d'Examen: 70-515

Nom d'Examen: Microsoft (TS: Web Applications Development with Microsoft .NET Framework 4)

Questions et réponses: 191 Q&As

Code d'Examen: 70-513

Nom d'Examen: Microsoft (TS: Windows Communication Foundation velopment with Microsoft .NET Framework 4)

Questions et réponses: 163 Q&As

Code d'Examen: 70-516

Nom d'Examen: Microsoft (TS: Accessing Data with Microsoft .NET Framework 4)

Questions et réponses: 196 Q&As

Code d'Examen: 70-511

Nom d'Examen: Microsoft (TS: Windows Applications Development with Microsoft .NET Framework 4)

Questions et réponses: 156 Q&As

Code d'Examen: 070-668

Nom d'Examen: Microsoft (PRO: Microsoft SharePoint 2010, Administrator)

Questions et réponses: 189 Q&As

70-511 Démo gratuit à télécharger: http://www.pass4test.fr/70-511.html


NO.1 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You want to add an audio player that plays .wav or .mp3 files when the user clicks a button.
You plan to store the name of the file to a variable named SoundFilePath.
You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays.
What should you do?
A. Write the following code segment in the button onclick event.
System.Media.SoundPlayer player = new System.Media.
SoundPlayer(SoundFilePath); player.play();
B. Write the following code segment in the button onclick event.
MediaPlayer player = new MediaPlayer();
player.Open(new URI(SoundFilePath), UriKind.Relative)); player.play();
C. Use the following code segment from the PlaySound() Win32 API function and call the PlaySound
function in the button onclick event.
[sysimport(dll="winmm.dll")]
public static extern long PlaySound(String SoundFilePath, long hModule, long dwFlags);
D. Reference the Microsoft.DirectX Dynamic Link Libraries. Use the following code segment in the button
onclick event.
Audio song = new Song(SoundFilePath);
song.CurrentPosition = song.Duration; song.Play();
Answer: B

certification Microsoft   certification 70-511   70-511   70-511 examen   certification 70-511

NO.2 You use Microsoft .NET Framework 4 to create a Windows Forms application.
You plan to use a Windows Presentation Foundation (WPF) control of the UserControl1 type hosted in an
ElementHost control named elementHost1.
You write the following code segment. (Line numbers are included for reference only.)
01public class WPFInWinForms {
02public WPFInWinForms
03{
04InitializeComponent();
05
06}
07private void OnBackColorChange(object sender, String propertyName, object value)
08{
09ElementHost host = sender as ElementHost;
10System.Drawing.Color col = (System.Drawing.Color)value;
11SolidColorBrush brush =
new SolidColorBrush(System.Windows.Medi
a.Color.FromRgb(col.R, col.G, col.B));
12UserControl1 uc1 = host.Child as UserControl1;
13uc1.Background = brush;
14}
15}
You need to ensure that the application changes the background color of the hosted control when the
background color of the form changes.
Which code segment should you insert at line 05?
A. elementHost1.PropertyMap.Remove("BackColor");
elementHost1.PropertyMap.Add("BackColor", new PropertyTranslator(OnBackColorChange));
B. elementHost1.PropertyMap.Remove("Background");
elementHost1.PropertyMap.Add("Background", new PropertyTranslator(OnBackColorChange));
C. elementHost1.PropertyMap.Add("BackColor", new PropertyTranslator(OnBackColorChange));
elementHost1.PropertyMap.Apply("BackColor");
D. elementHost1.PropertyMap.Add("Background", new PropertyTranslator(OnBackColorChange));
elementHost1.PropertyMap.Apply("Background");
Answer: A

certification Microsoft   70-511   70-511 examen   70-511   certification 70-511   70-511 examen

NO.3 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF)
application.
You write the following code segment.
public class Contact { private string _contactName;
public string ContactName {
get { return _contactName; }
set {
if (string.IsNullOrEmpty(value))
throw new ApplicationException("Contact name is required");
_contactName = value;
}
}
}
You add the following code fragment in a WPF window control.
<TextBox Text="{Binding Path=ContactName, ValidatesOnExceptions=True,
UpdateSourceTrigger=PropertyChanged}" />
The TextBox control is data-bound to an instance of the Contact class. You plan to implement an
ErrorTemplate in the TextBox control.
You need to ensure that the validation error message is displayed next to the TextBox control. Which code
fragment should you use?
A. <ControlTemplate>
<DockPanel>
<AdornedElementPlaceholder Name="box" />
<TextBlock Text="{Binding ElementName=box,
Path=AdornedElement.(Validation.Errors)[0].ErrorContent}" Foreground="Red" />
</DockPanel>
</ControlTemplate>
B. <ControlTemplate>
<DockPanel>
<AdornedElementPlaceholder Name="box" />
<TextBlock Text="{Binding ElementName=box, Path=(Validation.Errors)[0].Exception.Message}"
Foreground="Red" />
</DockPanel>
</ControlTemplate>
C. <ControlTemplate>
<DockPanel>
<ContentControl Name="box" />
<TextBlock Text="{Binding ElementName=box,
Path=ContentControl.(Validation.Errors)[0].ErrorContent}" Foreground="Red" />
</DockPanel>
</ControlTemplate>
D. <ControlTemplate>
<DockPanel> <ContentControl Name="box" />
<TextBlock Text="{Binding ElementName=box, Path=(Validation.Errors)[0].Exception.Message}"
Foreground="Red" />
</DockPanel>
</ControlTemplate>
Answer: A

certification Microsoft   70-511 examen   70-511   70-511   70-511

NO.4 You use Microsoft .NET Framework 4 to create a Windows Forms application.
You have a dataset as shown in the following exhibit.
You plan to add a DataGridView to display the dataset.
You need to ensure that the DataGridView meets the following requirements:
- Shows Order Details for the selected order.
- Shows only Order Details for items that have UnitPrice greater than 20.
- Sorts Products by ProductName
Which code segment should you use?
A. ordersBindingSource.DataSource = productsBindingSource;
ordersBindingSource.DataMember = "FK_Order_Details_Products";
productsBindingSource.Filter = "UnitPrice > 20";
productsBindingSource.Sort = "ProductName";
B. productsDataGridView.DataSource = ordersBindingSource;
productsBindingSource.Filter = "UnitPrice > 20";
productsBindingSource.Sort = "ProductName";
C. order_DetailsBindingSource.DataSource = ordersBindingSource;
order_DetailsBindingSource.DataMember = "FK_Order_Details_Orders";
order_DetailsBindingSource.Filter = "UnitPrice > 20";
productsBindingSource.Sort = "ProductName";
D. order_DetailsDataGridView.DataSource = ordersBindingSource;
order_DetailsBindingSource.Filter = "UnitPrice > 20";
productsBindingSource.Sort = "ProductName";
Answer: C

Microsoft   certification 70-511   certification 70-511   70-511   70-511

NO.5 You use Microsoft Visual Studio 2010 and Microsoft .
NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a WPF window in the application.
You add the following code segment to the application.
public class ViewModel
{
public CollectionView Data { get; set; }
}
public class BusinessObject
{
public string Name { get; set; }
}
The DataContext property of the window is set to an instance of the ViewModel class.
The Data property of the ViewModel instance is initialized with a collection of BusinessObject objects.
You add a TextBox control to the Window.
You need to bind the Text property of the TextBox control to the Name property of the current item of the
CollectionView of the DataContext object.
You also need to ensure that when a binding error occurs, the Text property of the TextBox control is set to
N/A .
Which binding expression should you use?
A. { Binding Path=Data/Name, FallbackValue='N/A' }
B. { Binding Path=Data.Name, FallbackValue='N/A' }
C. { Binding Path=Data/Name, TargetNullValue='N/A' }
D. { Binding Path=Data.Name, TargetNullValue='N/A' }
Answer: A

Microsoft examen   70-511 examen   70-511 examen   70-511

NO.6 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF)
application.
You write the following code segment. (Line numbers are included for reference only.)
01public class Contact
02{
03private string _contactName;
04
05public string ContactName {
06get { return _contactName; }
07set { _contactName = value; }
08}
09
10}
You add the following code fragment within a WPF window control.
<TextBox>
<TextBox.Text>
<Binding Path="ContactName" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<DataErrorValidationRule />
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>
The TextBox control is data-bound to an instance of the Contact class.
You need to ensure that the Contact class contains a business rule to ensure that the ContactName
property is not empty or NULL.
You also need to ensure that the TextBox control validates the input data.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two).
A. Replace line 01 with the following code segment. public class Contact : IDataErrorInfo
B. Replace line 01 with the following code segment. public class Contact : ValidationRule
C. Replace line 01 with the following code segment. public class Contact : INotifyPropertyChanging
D. Add the following code segment at line 04. public event PropertyChangingEventHandler
PropertyChanging;
E. Modify line 07 with the following code segment:
set {
if (this.PropertyChanging != null)
PropertyChanging(this, new
PropertyChangingEventArgs("ContactName"));
if (string.IsNullOrEmpty(value))
throw new ApplicationException("Contact name is required");
_contactName = value;
}
F. Add the following code segment at line 09.
public string Error {
public string this[string columnName] {
get {
if (columnName == "ContactName" &&
string.IsNullOrEmpty(this.ContactName))
return "Contact name is required";
return null;
}
}
Answer: AF

Microsoft   certification 70-511   certification 70-511   certification 70-511   70-511

NO.7 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You create a window that contains a Button control and a MenuItem control. Both controls are labeled
"Add sugar."
The Command properties of the Button and MenuItem controls are set to the same RoutedCommand
named AddSugarCommand.
You write the following code segment.
private void CanAddSugar (object sender, CanExecuteRoutedEventArgs e) { ... }
You need to ensure that when the CanAddSugar method sets e.CanExecute to false, the MenuItem and
Button controls are disabled.
What should you do?
A. Create an event handler for the CanExecuteChanged event of the AddSugarCommand command.
Call the CanAddSugar method from within the event handler.
B. Inherit the AddSugarCommand from the RoutedUICommand class instead of the RoutedCommand
class.
Call the CanAddSugar method from within the constructor of the AddSugarCommand command.
C. Add a CommandBinding object to the CommandBinding property of the MenuItem control.
Set the CanExecute property of the CommandBinding object to the CanAddSugar method.
D. Add a CommandBinding object to the CommandBindings property of the window.
Set the Command property of CommandBinding to the AddSugarCommand command.
Set the CanExecute property of the CommandBinding object to the CanAddSugar method.
Answer: D

Microsoft   70-511   70-511   certification 70-511   certification 70-511

NO.8 You create a Windows client application by using Windows Presentation Foundation (WPF).
The application contains the following code fragment.
<Window.Resources>
<DataTemplate x:Key="detail">
<!--...-->
</DataTemplate>
</Window.Resources>
<StackPanel>
<ListBox Name="lbDetails">
</ListBox>
<Button Name="btnDetails">Details</Button>
</StackPanel>
You need to assign lbDetails to use the detail data template when btnDetails is clicked.
Which code segment should you write for the click event handler for btnDetails?
A. lbDetails.ItemsPanel.FindName("detail",lbDetails);
B. var tmpl = (ControlTemplate)FindResource("detail"); lbDetails.Template = tmpl;
C. var tmpl = (DataTemplate)FindName("detail"); lbDetails.ItemTemplate = tmpl;
D. var tmpl = (DataTemplate)FindResource("detail"); lbDetails.ItemTemplate=tmpl;
Answer: D

Microsoft examen   70-511   70-511

NO.9 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a composite user control that includes a TextBox control named txtInput.
The user control will be hosted in a window and will have handlers for the text-changed event of txtInput.
You need to ensure that the application meets the following requirements:
- Creates a text-changed event handler named Audit_TextChanged for the txtInput control.
- Executes Audit_TextChanged even when specific handlers mark the event as handled.
Which code segment should you add to the constructor of the user control.?
A. txtInput.TextChanged+=Audit_TextChanged;
B. AddHandler (TextBox.TextChangedEvent, new RoutedEventHandler (Audit_TextChanged), true);
C. EventManager.RegisterClassHandler (typeof (TextBox),TextBox.TextChangedEvent, new
RoutedEventHandler (Audit_TextChanged), true);
D. EventManager.RegisterClassHandler (typeof (TextBox), TextBox.TextChangedEvent, new
RoutedEventHandler (Audit_TextChanged), false);
Answer: B

Microsoft examen   70-511   certification 70-511

NO.10 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application has a window named MainWindow that has a StackPanel control named sp as the root
element.
You want to create a Button control that contains a TextBlock control with the "Save" Text property.
You need to create the control dynamically and add the control to sp.
Which code segment should you write in the constructor of the MainWindow class?
A. Button btn = new Button();
TextBlock text = new TextBlock();
text.Text = "Save";
btn.Content = text;
sp.DataContext = btn;
B. Button btn = new Button();
TextBlock text = new TextBlock();
text.Text = "Save";
btn.Content = text;
sp.Children.Add(btn);
C. Button btn = new Button();
TextBlock text = new TextBlock();
text.Text = "Save";
sp.Children.Add(btn);
sp.Children.Add(text);
D. Button btn = new Button();
TextBlock text = new TextBlock();
text.Text = "Save";
btn.ContentTemplateSelector.SelectTemplate(text, null);
sp.Children.Add(btn);
Answer: B

Microsoft examen   70-511   70-511   certification 70-511   70-511   70-511

NO.11 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.
<StackPanel TextBox.PreviewTextInput="StackPanel_PreviewTextInput">
<TextBox Name="TxtBoxA"/>
<TextBox Name="TxtBoxB"/>
<TextBox Name="TxtBoxC"/>
</StackPanel>
You create an event handler named StackPanel_PreviewTextInput. You also have a collection of strings
named Keywords.
You need to ensure that TxtBoxA and TxtBoxB do not contain any of the strings in the Keywords
collections.
Which code segment should you use?
A. private void StackPanel_PreviewTextInput( object sender, TextCompositionEventArgs e)
{ FrameworkElement feSource = sender as FrameworkElement;
if (feSource.Name == "TxtBoxA" || feSource.Name == "TxtBoxB")
{ foreach(string keyword in Keywords)
{
if(e.Text.Contains(keyword)) {
e.Handled = false;
return;
}
}} e.Handled = true;
} }
B. private void StackPanel_PreviewTextInput( object sender, TextCompositionEventArgs e) {
FrameworkElement feSource = e.Source as FrameworkElement;
f (feSource.Name == "TxtBoxA" || feSource.Name == "TxtBoxB")
f (feSource.Name == "TxtBoxA" || feSource.Name == "TxtBoxB") {
foreach(string keyword in Keywords)
{
if(e.Text.Contains(keyword)) {
e.Handled = false;
return;
}
} e.Handled = true;
C. private void StackPanel_PreviewTextInput( object sender, TextCompositionEventArgs e)
{
FrameworkElement feSource = sender as FrameworkElement;
if (feSource.Name == "TxtBoxA" || feSource.Name == "TxtBoxB")
{ foreach(string keyword in Keywords)
{ if(e.Text.Contains(keyword)) {
e.Handled = true;
return; }
} e.Handled = false;
} }
D. private void StackPanel_PreviewTextInput( object sender, TextCompositionEventArgs e)
{ FrameworkElement feSource = e.Source as FrameworkElement;
if (feSource.Name == "TxtBoxA" || feSource.Name == "TxtBoxB")
{
foreach(string keyword in Keywords)
{ if(e.Text.Contains(keyword)) {
e.Handled = true;
return;
} } e.Handled = false;
}
}
Answer: D

Microsoft   70-511   70-511 examen   70-511

NO.12 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF)
application.
You plan to use an existing Windows Forms control named MyWinFormControl in the MyControls
assembly.
You need to ensure that the control can be used in your application.
What should you do?
A. Add the following code fragment to the application.
<Window x:Class="HostingWfInWpf.Window1"
xmlns="http: //schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http: //schemas.microsoft.com/winfx/2006/xaml"
xmlns:wf="clr-namespace:MyCompany.Controls;assembly=MyControls;" Title="HostingWfInWpf" >
<Grid>
<ElementHost>
<wf:MyWinFormControl x:Name="control" />
</ElementHost>
</Grid> </Window>
B. Add the following code fragment to the application.
<Window x:Class="HostingWfInWpf.Window1"
xmlns="http: //schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http: //schemas.microsoft.com/winfx/2006/xaml"
xmlns:wf="clr-namespace:MyCompany.Controls;assembly=MyControls;" Title="HostingWfInWpf" >
<Grid>
<WindowsFormsHost>
<wf:MyWinFormControl x:Name="control" />
</WindowsFormsHost>
</Grid> </Window>
C. Add the following code segment to the WindowsLoaded function.
ElementHost host = new ElementHost();
host.Dock = DockStyle.Fill;
MyWinFormControl control = new MyWinFormControl();
host.Child = control;
this.Controls.Add(host);
D. Add the following code segment to the WindowsLoaded function.
Grid grid = new Grid();
System.Windows.Forms.Integration.WindowsFormsHost host = new
System.Windows.Forms.Integration.WindowsFormsHost();
MyWinFormControl control = new MyWinFormControl();
grid.Children.Add(host);
Answer: B

Microsoft examen   certification 70-511   70-511   70-511

NO.13 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
You write the following code fragment.
<StackPanel>
<StackPanel.Resources>
<Style TargetType="{x:Type Button}">
<EventSetter Event="Click" Handler="ButtonHandler"/>
</Style>
</StackPanel.Resources>
<Button Name="OkButton">Ok</Button>
<Button Name="CancelButton" Click="CancelClicked">Cancel</Button>
</StackPanel>
You need to ensure that the ButtonHandler method is not executed when the user clicks the CancelButton
button.
Which code segment should you add to the code-behind file?
A. private void CancelClicked(object sender, RoutedEventArgs e)
{
Button btn = (Button)sender;
btn.Command = null;
}
B. private void CancelClicked(object sender, RoutedEventArgs e) {
Button btn = (Button)sender;
btn.IsCancel = true;
}
C. private void CancelClicked(object sender, RoutedEventArgs e) {
e.Handled = true;
}
D. private void CancelClicked(object sender, RoutedEventArgs e) {
e.Handled = false;
}
Answer: C

Microsoft   certification 70-511   70-511   70-511

NO.14 You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application.
The application contains a composite user control that includes a TextBox control named txtInput.
The user control will be hosted in a window and will have handlers for the text-changed event of txtInput.
You need to ensure that the application meets the following requirements:
AddHandler (TextBox.TextChangedEvent, new RoutedEventHandler (Audit_TextChanged), true);
Which of the following statments are TRUE? (choose all that apply)
A. A text-changed event handler, named Audit_TextChanged, was Created for the txtInput control.
B. Audit_TextChanged will stop running because the event is marked as handled by certain event
handlers.
C. Even through the event is marked handled by certain event handlers, Audit_TextChanged will still run.
D. Audit_TextChanged will continue to run until the event is marked as handled.
Answer: AC

Microsoft   70-511 examen   certification 70-511

NO.15 You use Microsoft .NET Framework 4 to create a Windows Forms application.
You add a new class named Customer to the application.
You select the Customer class to create a new object data source.
You add the following components to a Windows Form:
- A BindingSource component named customerBindingSource that is data-bound to the Customer object
data source.
- A set of TextBox controls to display and edit the Customer object properties.
- Each TextBox control is data-bound to a property of the customerBindingSource component.
- An ErrorProvider component named errorProvider that validates the input values for each TextBox
control.
You need to ensure that the input data for each TextBox control is automatically validated by using the
ErrorProvider component.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
A. Implement the validation rules inside the Validating event handler of each TextBox control by throwing
an exception when the value is invalid.
B. Implement the validation rules inside the TextChanged event handler of each TextBox control by
throwing an exception when the value is invalid.
C. Implement the validation rules inside the setter of each property of the Customer class by throwing an
exception when the value is invalid.
D. Add the following code segment to the InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.customerBindingSource;
E. Add the following code segment to the InitializeComponent method of the Windows Form.
this.errorProvider.DataSource = this.customerBindingSource.DataSource;
this.errorProvider.DataMember = this.customerBindingSource.DataMember;
Answer: CD

certification Microsoft   70-511 examen   certification 70-511   70-511 examen   70-511