Pass the GIAC GIAC Certification GSSP-.NET Questions and answers with CertsForce

Viewing page 6 out of 14 pages
Viewing questions 51-60 out of questions
Questions # 51:

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating a Windows service application using the .NET Framework. The service is used to execute several tasks that require background processing. You do not want to actively manage threads in the service application, but you must make sure that security checks are performed during the execution of the task. What will you do to accomplish the task?

Options:

A.

Use the ThreadPool.UnsafeQueueUserWorkItem method.


B.

thread2 raises its own priority


C.

Use the Thread.Start method.


D.

Use the Thread.Resume method.


E.

Use the ThreadPool.QueueUserWorkItem method.


Questions # 52:

Allen works as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. Allen develops an application using .NET Framework 3.5. The application connects to a SQL Server database using a SqlConnection object named Connection1. He creates some stored procedures in the database, which are used to update the data. Allen finds that sometimes, the update operation does not affect any row. He wants to add an error handling code to the application. Which of the following code segments will he use to accomplish the task?

Options:

A.

try

{

Connection1.open();

}

catch(DataException Myexcept)

{

//Error-handling code

}


B.

try

{

Connection1.open();

}

catch(SqlException Myexcept)

{

//Error-handling code

}


C.

try

{

Connection1.open();

}

catch(DBConcurrencyException Myexcept)

{

//Error-handling code

}


D.

try

{

Connection1.open();

}

catch(InvalidCastException Myexcept)

{

//Error-handling code

}


Questions # 53:

You work as a Software Developer for ABC Inc. The Company uses .NET Framework as its application development platform. You are creating an application that will use multiple collections. Therefore, you decide to use only those collections that are available under both the System.Collections and System.Collections.Generic namespaces. Which of the following collections will you use to accomplish the task?

Each correct answer represents a complete solution. Choose three.

Options:

A.

SortedDictionary


B.

List


C.

Stack


D.

SortedList


E.

Comparer


Questions # 54:

Mark works as a Software Developer for McRobert Inc. He develops an ASP.NET application using Visual Studio .NET. The application loads department name and employee data only once in each user's session. Mark creates two DataTable objects, named Employees and Departments. The

Departments object remains static, but the Employees object is modified whenever new employees join the company.

Mark wants to minimize the time it takes for the application to reload an ASP.NET page after each change. Which of the following statements will he use to accomplish this?

Options:

A.

Session("Departments") = Departments

Cache("Employees") = Employees


B.

Cache("Departments") = Departments

Cache("Employees") = Employees


C.

Session("Departments") = Departments

Session("Employees") = Employees


D.

Cache("Departments") = Departments

Session("Employees") = Employees


Questions # 55:

John works as a Web Developer for TechCom Inc. He creates an ASP.NET application, named MyApp1, by using Visual Studio .NET for a University Web site. Students will use MyApp1 to view their term end results. MyApp1 contains an ASP.NET page, named Page1. Page1 contains a TextBox control, named txtEnrolmentNo, and two Button controls, named btnSubmit and btnCancel.

John wants to display the text "Enter Enrolment Number" within txtEnrolmentNo. He wants to ensure that if a user tries to submit the page without entering an enrolment number, the word "Error" appears next to txtEnrolmentNo. Which of the following actions will he take to accomplish the task?

Each correct answer represents a part of the solution. Choose two.

Options:

A.

Add a RequiredFieldValidator control to the page. Set its ControlToValidate property to txtEnrolmentNo, InitialValue property to "Enter Enrolment Number", and ErrorMessage property to "Error".


B.

Add a RequiredFieldValidator control to the page. Set its ControlToValidate property to txtEnrolmentNo, ErrorMessage property to "Enter Enrolment Number", and InitialValue property to "Error".


C.

Set the InitialValue property of txtEnrolmentNo to "Enter Enrolment number".


D.

Set the Text property of txtEnrolmentNo to "Enter Enrolment number".


E.

Add a RegularExpressionValidator control to the page. Set its ControlToValidate property to txtEnrolmentNo, ErrorMessage property to "Enter Enrolment Number", and InitialValue property to "Error".


Questions # 56:

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating a .NET remoting application using .NET Framework 2.0.

The object of the application will be shared by multiple applications. You want to use simple, modular, extensible, and XML-based protocol to exchange messages between remoting applications. What will you do to accomplish the task?

Options:

A.

Use the BinaryFormatter class.


B.

Use client activated objects.


C.

Use the SoapFormatter class.


D.

Use the SOAP protocol.


Questions # 57:

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create a Windows Forms application using .NET Framework 3.5. The application contains a data-bound control. The user interface (UI) for modifying data from a LinqDataSource control is typically provided through the data-bound control. You are required to perform automatic data modifications. Which of the following conditions are required to enable automatic data modifications?

Each correct answer represents a part of the solution. Choose all that apply.

Options:

A.

The class that is assigned to the ContextTypeName property must derive from DataContext .


B.

The GroupBy property cannot be assigned a value.


C.

The property that is assigned to the TableName property must derive from Table(TEntity).


D.

The Where property cannot be assigned a value.


E.

The Select property cannot be assigned a value.


Questions # 58:

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You create an application named StringRW using .NET Framework. You store some characters into an array of Unicode characters. You need to write all or some of these characters into a String object. Which of the following code segments will you choose to accomplish this task?

Each correct answer represents a complete solution. Choose all that apply.

Options:

A.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

StringWriter sw = new StringWriter(sb);

Object obj=(Object)b;

sw.Write(obj);

Console.WriteLine(sb);

sw.Close();


B.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

StringWriter sw = new StringWriter(sb);

sw.Write(b);

Console.WriteLine(sb);

sw.Close();


C.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

string str=new string(b);

StringWriter sw = new StringWriter(sb);

sw.Write(str);

Console.WriteLine(sb);

sw.Close();


D.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

StringWriter sw = new StringWriter(sb);

sw.Write(b, 0, 5);

Console.WriteLine(sb);

sw.Close();


Questions # 59:

Rick works as a Software Developer for GenTech Inc. He develops an application named App1 by using C# .NET. App1 uses a Microsoft SQL Server database named Database1. Database1 contains a table named Table1. Table1 stores data entered through App1. Rick wants App1 to notify every fifteen minutes about the new data entered. He wants to develop another application named App2, which reads Table1 every fifteen minutes and sends new data to the concerned department of the company.

App2 will run on a computer that is used by several users who continuously log on and log off from the network to perform miscellaneous tasks. Which of the following .NET application types will Rick use to accomplish the task?

Options:

A.

Windows service


B.

Windows Form


C.

.NET remote object


D.

XML Web service


Questions # 60:

You work as a software developer for ManSoft Inc. The company uses Visual Studio .NET 2005 as its application development platform. You use C#. NET to create an assembly that will be consumed by other Visual Studio .NET applications. No Permissions should be granted to this assembly unless the assembly makes a minimum permission request. You need to write a code for the assembly that makes a minimum permission request. Which of the following code segments will you use to accomplish this task?

Options:

A.

[Assembly: PermissionSet(SecurityAction.RequestOptional, Unrestricted = false)]


B.

[Assembly: PermissionSet(SecurityAction.PermitOnly, Unrestricted = true)]


C.

[Assembly: PermissionSet(SecurityAction.PermitOnly, Unrestricted = false)]


D.

[Assembly: PermissionSet(SecurityAction.RequestOptional, Unrestricted = true)]


Viewing page 6 out of 14 pages
Viewing questions 51-60 out of questions