Month End Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70percent

GIAC GSSP-.NET GIAC GIAC Secure Software Programmer - C#.NET Exam Practice Test

Demo: 72 questions
Total 491 questions

GIAC GIAC Secure Software Programmer - C#.NET Questions and Answers

Question 1

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Web application using .NET Framework 2.0. You add a Web Form that contains a button named bCancel. The button allows users to exit the form. When users click the button, validation should not occur. However, during testing you find that clicking the button does not allow users to exit the form. You need to ensure that users can always exit the page. What will you do?

Options:

A.

Set the CausesValidation property of the bCancel button to false.

B.

Set the AccessibleName property of the validation controls on the Web Form to "false".

C.

Set the ControlToValidate property of the validation controls on the Web Form to the ID of the control.

D.

Set the Enabled property of the validation controls on the Web Form to false.

Question 2

Which of the following elements will you use to add a script to the ScriptManager declaratively?

Options:

A.

B.

C.

D.

<script>

Question 3

Andrew works as a Software Developer for Mansoft Inc. The company's network has a Web server that hosts the company's Web site. Andrew wants to enhance the security of the Web site by implementing Secure Sockets Layer (SSL). Which of the following types of encryption does SSL use?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Symmetric

B.

Secret

C.

IPSec

D.

Asymmetric

Question 4

You work as a Software Developer for ABC Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You have recently finished the development of an application using .NET Framework 2.0. The application can be used only for cryptography. Therefore, you have implemented the application on a computer. What will you call the computer that implemented cryptography?

Options:

A.

Cryptographic toolkit

B.

Cryptosystem

C.

Cryptographer

D.

Cryptanalyst

Question 5

Bill works as a Software Developer for SunInfo Inc. He develops an application named SunApplication using C# .NET. The employees of the company use SunApplication for viewing and editing inventory data. SunApplication receives data from a file named MyFile.xml, which currently does not provide any information. Bill decides to write code to get information from the MyFile.xml file. Which of the following code segments will he use to resolve the issue?

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

Options:

A.

FileInfo FI = new FileInfo(@"c:\temp\MyFile.xml");

Console.WriteLine("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

B.

FileInfo FI = new FileInfo ("@c:\program files\temp\MyFile.xml");

Console.WriteLine ("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

C.

FileInfo FI = new FileInfo("MyFile.xml");

Console.WriteLine("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

D.

string str=@"c:\windows\MyFile.xml";

FileInfo FI = new FileInfo (str);

FI.Open (FileMode.Open, FileAccess.Read);

Console.WriteLine("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

Question 6

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a method to call a COM component using the .NET Framework. You want to use declarative security to request the runtime to run a complete stack walk. You need to ensure that all callers be obliged to level of trust for COM interop before the callers execute the method. Which of the following attributes will you place on the method to accomplish the task?

Options:

A.

[SecurityPermissionSecurityAction.LinkDemand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

B.

[SecurityPermission(SecurityAction.Deny,

Flags = SecurityPermissionFlag.UnmanagedCode)]

C.

[SecurityPermission(SecurityAction.Demand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

D.

[SecurityPermission(SecurityAction.Assert,

Flags = SecurityPermissionFlag.UnmanagedCode)]

Question 7

John works as a Web Developer for ProLabs Inc. He develops an ASP.NET application, named

MyWebApp1, using Visual Studio .NET. One of the pages in the application is named as Page1.aspx, which does not need to maintain session state. To improve the performance of the application, John wants to disable session state for Page1. Which of the following actions will he take to accomplish the task?

Options:

A.

Set the EnableViewState attribute in the @ Page directive to false.

B.

Set the DisableSessionState attribute in the @ Page directive to true.

C.

In the sessionState configuration section of the application's Web.config file, set the mode attribute to off.

D.

Set the EnableSessionState attribute in the @ Page directive to false.

Question 8

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a method to call a COM component using the .NET Framework. You want to use declarative security to request the runtime to run a complete stack walk. You need to ensure that all callers be obliged to level of trust for COM interop before the callers execute the method. Which of the following attributes will you place on the method to accomplish the task?

Options:

A.

[SecurityPermission(SecurityAction.Demand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

B.

[SecurityPermission(SecurityAction.Deny,

Flags = SecurityPermissionFlag.UnmanagedCode)]

C.

[SecurityPermissionSecurityAction.LinkDemand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

D.

[SecurityPermission(SecurityAction.Assert,

Flags = SecurityPermissionFlag.UnmanagedCode)]

Question 9

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create an ASP.NET Web application using the .NET Framework 3.5. You want to use a HTTP module called on each and every request made by the application. It is called as part of the ASP.NET request pipeline. It has right to access life-cycle events throughout the request. You also want to ensure that the HTTP module allows a user to inspect incoming and outgoing requests and take appropriate action based on the request. What will be the correct order to create the HTTP module?

Options:

A.
Question 10

You work as a Software Developer for InfoTech Inc. You create a Windows form in a Windows-based application named MyWinApp1. You use graphics in the form. You write the following code in your form:

private void MyMouseEvent1(object sender1, MouseEventArgs event)

{

// Code to handle mouse events

}

You want to implement a property of the MouseEventArgs object. This property will return a Point structure that contains the x-coordinate and y-coordinate of the mouse. Which of the following properties of the MouseEventArgs object will you use to accomplish this?

Options:

A.

Y

B.

Delta

C.

Location

D.

Button

E.

Clicks

F.

X

Question 11

Allen works as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. He creates an application using .NET Framework. He wants to encrypt all his e-mails that he sends to anyone. Which of the following will he use to accomplish the task?

Options:

A.

PPP

B.

FTP

C.

PGP

D.

PPTP

Question 12

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create a Web application using .NET Framework 3.5. You want to redirect users to a default error page if an unhandled error occurs within your site. Which of the following actions will you perform to accomplish the task?

Options:

A.

Set the mode attribute of the customErrors element to Off and the defaultRedirect attribute to an error page within your site.

B.

Set the statusCode attribute of the error element to 404 and the redirect attribute to a custom error page.

C.

Set the redirect attribute of the error element to an error page within your site.

D.

Set the mode attribute of the customErrors element to On and the defaultRedirect attribute to an error page within your site.

Question 13

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. You create a Web form in the application that permits users to provide personal information. You add a DropDownList control to the Web form to retrieve the residential status of users. The default item that the DropDownList control displays is the "Select Country" option. You have to ensure that users select a country other than the default option. Which of the following validation controls should you use to accomplish this task?

Options:

A.

RangeValidator

B.

RequiredFieldValidator

C.

CustomValidator

D.

RegularExpressionValidator

Question 14

You work as a Software Developer for ABC Inc. You develop a multi-threaded application named MyMultThreadApp using Visual Studio .NET. The application logs all warning and informational messages in an event log that keeps track of significant events when the application is running. The event log records information that might be useful for troubleshooting or performance analysis. Which of the following are the considerations that you must keep in mind when logging events with multithreaded components?

Each correct answer represents a complete solution. Choose three.

Options:

A.

An exclusive lock should be obtained on the log to avoid race conditions.

B.

Each shared component should be thread-safe when interacting with an event log.

C.

The System.Threading namespace should be used to record the identity of each thread for logging messages.

D.

The Debug and Trace classes should be used to log events.

Question 15

You are working on an ASP.NET Web application and using .NET 2.0 as the application development platform. Authenticated users want their passwords to recover through the application. Which of the following are necessary to enable the user password recovery option for your application?

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

Options:

A.

Using an ASP.NET membership for authentication.

B.

Sending e-mail messages to the users.

C.

Using the PasswordRecovery control.

D.

Using the ChangedPassword control.

Question 16

Which of the following is an exception of background threads as compared to foreground threads?

Options:

A.

A background thread does not continue the managed execution environment running.

B.

A background thread does not affect the outcome of an unhandled exception.

C.

A background thread belongs to the managed thread pool.

D.

A background thread changes to a foreground thread at any time.

Question 17

You work as a Software Developer for Webtech Inc. You plan to migrate the existing Active Server Pages (ASP) pages to ASP.NET Web pages in order to implement rich functionalities of a Web browser in your Web pages. Therefore, you want to add controls to Web pages of your existing application named WebApp1. Which of the following controls will be most suitable to implement?

Options:

A.

HTML server controls

B.

Web server controls

C.

Validation controls

D.

HTML controls

Question 18

Which of the following data structures is used for storing reference data types?

Options:

A.

Stack

B.

Queue

C.

Hard disk

D.

Heap

Question 19

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. You need to represent a strongly typed lambda expression as a data structure in the form of an expression tree. Which of the following classes will you use to accomplish the task?

Options:

A.

MethodCallExpression

B.

Expression(TDelegate)

C.

Expression

D.

LambdaExpression

Question 20

You work as a Software Developer for Blue Well Inc. You create a mobile Web application for mobile users. You want to ensure that a cookieless session is implemented on it. Which of the following statements are the main reasons of implementing a cookieless session on a mobile Web application?

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

Options:

A.

Tests mobile Web applications

B.

Stores data in Web server memory

C.

Ensures better compatibility with mobile devices

D.

Maintains session state of each user

Question 21

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create a Web application using .NET Framework 3.5. You want to implement state management in your application. In which of the following stages of the application life cycle will your application actually start?

Options:

A.

On creation of an instance of the HttpApplication class

B.

When an instance of the ApplicationManager class is created

C.

When instances of the core objects such as HTTPContext, HTTPRequest, and HTTPResponse are created

D.

When a user first makes a request for a page in your Web site

Question 22

Dilton works as a Software Developer for GREC Research Center (Central). This research center has its subsidiaries in several different cities. Dilton wants to retrieve a Soil Test Report for the Geological Survey Department. He wants the test report to be available to all the members of the department over the Internet. He creates an XML Web service named SampleReport. SampleReport contains a Web method named SoilTestDetails that requires additional security.

Dilton decides to use generic role-based security to secure the SoilTestDetails method from unauthorized users. Dilton writes code to ensure that once a user is authenticated, a user identity named Generic is created. The Generic user identity has a group membership named GeoSurvey to allow the authenticated users access to the SoilTestDetails Web method. Which of the following code segments should Dilton use to accomplish the task?

Options:

A.

GenericIdentity GenIdentity = new GenericIdentity("Generic", "Custom");

string[] GeoRoles = {"GeoSurvey"};

GenericPrincipal GeoPrincipal = new GenericPrincipal(GenIdentity, GeoRoles);

Thread.CurrentPrincipal = GeoPrincipal;

B.

IIdentity GeoIdentity = new GenericIdentity("Generic", "Custom");

WindowsIdentity WinGeoIdentity = (WindowsIdentity) GeoIdentity;

string[] GeoRoles = {"GeoSurvey"};

GenericPrincipal GenGeoPrincipal = new GenericPrincipal(WinGeoIdentity, GeoRoles );

WindowsIdentity.Impersonate(WinGeoIdentity.Token);

C.

IIdentity GeoIdentity = new GenericIdentity("Generic", "GeoSurvey");

IPrincipal GeoPrincipal = new WindowsPrincipal((WindowsIdentity) GeoIdentity);

Thread.CurrentPrincipal = GeoPrincipal;

D.

System.Security.Principal.IIdentity MyGenericIdentity = new GenericIdentity("Generic",

"Custom");

string[] GeoRoles = {"GeoSurvey"};

GenericPrincipal GenGeoPrincipal = new GenericPrincipal(MyGenericIdentity, GeoRoles);

MyGenericIdentity = WindowsIdentity.GetCurrent();

Question 23

George works as a Software Developer for GenTech Inc. He creates an application named App1 using Visual Studio .NET. App1 uses the version 2.0.0.0 of an assembly named Assembly1. However, he wants App1 to use a new version i.e. 2.1.0.0 of Assembly1. Therefore, he needs to specify Assembly1's location so that App1 can use version 2.1.0.0 of Assembly1. What will George use to accomplish the task?

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

Options:

A.

The element.

B.

A managed code.

C.

The element.

D.

An unmanaged code.

Question 24

Lewis works as a Web Developer for TechNet Inc. He develops an ASP.NET application named App1 by using Visual Studio .NET. Lewis wants to allow everyone access to the application. However, he does not want to implement any type of Windows authentication. Which of the following authentication methods will he use to accomplish this task?

Options:

A.

Basic authentication

B.

Anonymous authentication

C.

Digest authentication

D.

Integrated Windows authentication

Question 25

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application using .NET Framework 2.0. You are using regular expression in the application to validate email, phone number, etc. You are required to match any single character except "\n". Which of the following wildcard characters will you use to accomplish the task?

Options:

A.

x/y

B.

+

C.

?

D.

.

Question 26

Andrew works as a Software Developer for Mansoft Inc. The company's network has a Web server that hosts the company's Web site. Andrew wants to enhance the security of the Web site by implementing Secure Sockets Layer (SSL). Which of the following types of encryption does SSL use?

Each correct answer represents a complete solution. Choose two.

Options:

A.

IPSec

B.

Asymmetric

C.

Symmetric

D.

Secret

Question 27

Patrick works as a Software Developer for BlueWell Inc. He develops an ASP.NET application

named App1 using Visual Studio .NET. The application displays employee registration form on the company's Web site. The form contains the following fields:

l First Name

l Last Name

l Date of Birth

l E-mail

The application contains a TextBox control for each field. Patrick wants the application to provide a user-defined error message whenever an employee makes a wrong entry on the form. Patrick uses a CustomValidator validation control in the application. Which of the following properties is mandatory if the CustomValidator control is used to validate a user input data entry?

Options:

A.

EnableViewState

B.

IsValid

C.

EnableTheming

D.

ErrorMessage

Question 28

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows Forms application by using the .NET Framework. The application executes a background thread. You are required to create the thread to exit, but you must also inform the main thread when the background thread has finished. What will you do to accomplish this?

Options:

A.

Call the Join method of the Thread class.

B.

Call the Sleep method of the Thread class.

C.

Call the Abort method of the Thread class.

D.

Call the Interrupt method of the Thread class.

Question 29

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You are developing an application that manages sports teams. When a user queries details about a particular team, the id and name of each member of the team must be stored as a single collection. You must create the collection of team members in the most efficient manner, in a manner that guarantees type safety, and in a manner that will require the least amount of code to retrieve and work with the data in the collection. Which code segment should you choose?

Options:

A.

string[] team = new string[] {

"1, Bob Jones",

"2, Jim Smith", "3, Shannon Horn",

"4, Brandon Searles", "5, Jack Hill",

"6, Brian Kirkland", "7, Sean Calahan",

"8, Mark Banker"};

B.

ArrayList team = new ArrayList();

team.Add("1, Bob Jones");

team.Add("2, Jim Smith");

team.Add("3, Shannon Horn");

team.Add("4, Brandon Searles");

team.Add("5, Jack Hill");

team.Add("6, Brian Kirkland");

team.Add("7, Sean Calahan");

team.Add("8, Mark Banker");

C.

Hashtable team = new Hashtable();

team.Add(1, "Bob Jones");

team.Add(2, "Jim Smith");

team.Add(3, "Shannon Horn");

team.Add(4, "Brandon Searles");

team.Add(5, "Jack Hill");

team.Add(6, "Brian Kirkland");

team.Add(7, "Sean Calahan");

team.Add(8, "Mark Banker");

D.

Dictionary team = new Dictionary();

team.Add(1, "Bob Jones");

team.Add(2, "Jim Smith");

team.Add(3, "Shannon Horn");

team.Add(4, "Brandon Searles");

team.Add(5, "Jack Hill");

team.Add(6, "Brian Kirkland");

team.Add(7, "Sean Calahan");

team.Add(8, "Mark Banker");

Question 30

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application using .NET Framework 2.0. The application has multiple threads that execute one after another. You want to ensure that the application terminates only when all the threads complete their tasks. Which of the following methods will you use to accomplish the task?

Options:

A.

Join

B.

Abort

C.

Sleep

D.

Suspend

Question 31

You work as Enterprise Application Developer in SunInfo Inc. The company uses Microsoft .NET Framework 3.5. You design an application. You are required to execute queries against a collection and file directories. Which of the following data access technologies will you use to accomplish the task?

Options:

A.

LINQ to Objects

B.

LINQ to Data Services

C.

LINQ to XML

D.

LINQ to DataSets

Question 32

Which of the following code snippets is an example of tight encapsulation?

Options:

A.

private int x;

public void fun(){x=5;}

B.

private int x;

private void fun(){x=5;}

C.

public int x;

public void fun() {x=5;}

D.

protected int x;

protected void fun(){x=5;}

E.

int x;

public void fun(){x=5;}

Question 33

You work as an Application Developer for ABC. The company uses Visual Studio .NET Framework 3.5 as its application development platform. You are working on enhancements to an existing WPF application. One problem you have been encountering is that users of the current version routinely enter invalid data, and since the controls use data binding, that data either gets put in the database incorrectly, or in some cases generates a database error. You want to incorporate validation with your data bound controls. Which of the following choices is the best way to accomplish this goal?

Options:

A.

Use the default error template and implement it when binding the individual controls to the data source.

B.

Assign validator controls to each control you wish to validate, and incorporate those in the binding of that control to the data source.

C.

Use a custom error template and implement it when binding the individual controls to the data source.

D.

Assign validator controls to each control you wish to validate, and set the validation properties to indicate what constitutes valid data.

Question 34

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating an application using the .NET Framework. You are required to call an unmanaged method from your managed code with the help of platform invoke services. What will you do to accomplish this task?

Options:

A.

1. Export a type library for your managed code

B.

1. Import a type library as an assembly

2. Create instances of COM object

C.

1. Register your assembly by using COM

2. Reference your managed code from COM

D.

1. Create a class to hold DLL methods

2. Create prototype methods with managed code

Question 35

Ryan works as a Software Developer for Mansoft Inc. He creates an ASP.NET Web application named MyWebApplication using Visual Studio .NET 2005. MyWebApplication performs validation on XML files in a directory. Whenever a new XML file appears in the directory, MyWebApplication opens the file, checks it for validation, and updates it accordingly. Ryan wants to ensure that each update performed on XML files is logged in the Web application log. He creates a String object named Var1, to store the message to be logged. Which of the following will he use to accomplish the task?

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

Options:

A.

The EventLog.Source property

B.

The EventLog.WriteEntry method

C.

The Trace.WriteLine method

D.

The EventLog.EventLogSource property

Question 36

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows application using the .NET Framework. You create a Semaphore class instance in the application by using the following code snippet:

Semaphore tSema = new Semaphore(0, 5);

...

tSema.Release(6);

What will the above code segment do?

Options:

A.

It will set the maximum count for the semaphore to 6.

B.

It will set the initial count for the semaphore to 5.

C.

It will throw a SemaphoreFullException.

D.

It will throw a ThreadAbortException.

Question 37

You work as a Software Developer for ABC Inc. You develop a Web application that contains several Web pages. The Web pages contain several Web server controls that implement validation controls for user input validation. Under which of the following circumstances will you perform user input validation programmatically for Web server controls?

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

Options:

A.

When the validity of a control or a Web page is to be determined in the Page_Load event h andler.

B.

When the user input validation data values are not set until run time.

C.

When the server or validation controls are added during design time.

D.

When the validity of a control or a Web page is to be determined in the Page_Init event ha ndler.

E.

When the server or validation controls are added during run time.

Question 38

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. You create a Web form in the application that permits users to provide personal information. You add a DropDownList control to the Web form to retrieve the residential status of users. The default item that the DropDownList control displays is the "Select Country" option. You have to ensure that users select a country other than the default option. Which of the following validation controls should you use to accomplish this task?

Options:

A.

RangeValidator

B.

RequiredFieldValidator

C.

CustomValidator

D.

RegularExpressionValidator

Question 39

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You create an application using .NET Framework. You need to establish a Secure Sockets Layer (SSL) session with a remote server. The security policy of the company requires that both the client and server to provide a valid certificate for authentication before communications begins. Which of the following properties of the SslStream class will you use to accomplish this task?

Options:

A.

SslStream.IsServer

B.

SslStream.IsMutuallyAuthenticated

C.

SslStream.IsAuthenticated

D.

SslStream.IsSigned

E.

SslStream.IsEncrypted

Question 40

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. The application uses Forms authentication. Your company uses Active Directory.

You need to modify the application to enable users to make use of their existing Active Directory account to access the application through the Internet. You are required to ensure that the application must be modified with the least amount of user interface changes, cost, and development effort. What will you do to accomplish this?

Options:

A.

Remove Forms authentication and create an ASP.NET membership.

B.

Change the membership provider to ActiveDirectoryMembershipProvider.

C.

Create a custom membership provider that has access to the corporate Active Directory.

D.

Change the application to use the Windows authentication provider instead of Forms authentication.

Question 41

Daniel works as a Software Developer for GenTech Inc. He develops an ASP.NET application, named

App1, using Visual Studio .NET. He creates an interface in App1, named Employees. The Employees interface contains declaration for a method, named Method1. Daniel creates another interface, named HeadOfDept. HeadOfDept inherits from the Employees interface and contains the declaration for a method, named Method2. He then creates a class named Manager as follows:

public class Manager : HeadOfDept

Which of the following statements about the application are true?

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

Options:

A.

The Manager class must implement the Method1 method.

B.

The Manager class implements the HeadOfDept interface.

C.

The Manager class must implement the Method2 method.

D.

The Method1 method can have any access modifier.

Question 42

You work as a Software Developer for Mansoft Inc. You create an application and use it to create users as members of the local Users group. Which of the following code snippets imperatively demands that the current user is a member of the local Users group?

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

Options:

A.

System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

PrincipalPermission MyPermission = new PrincipalPermission(null, @"BUILTIN\Users", true);

MyPermission.Demand();

B.

PrincipalPermission MyPermission = new PrincipalPermission(null, @"BUILTIN\Users", true); MyPermission.Demand();

C.

System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

PrincipalPermission MyPermission = new PrincipalPermission(null, @"Users", true);

MyPermission.Demand();

D.

PrincipalPermission MyPermission = new PrincipalPermission(null, @"Users", true);

MyPermission.Demand();

Question 43

Allen works as a Software Developer for Mansoft Inc. He develops an application using Visual Studio .NET 2005. The application connects to a SQL Server database using a SqlConnection object named NewConnection. Allen creates a few stored procedures in the database. Sometimes an error occurs, when a user executes stored procedures. Allen wants to add an error-handling code to the application to handle errors that occur on executing stored procedures. Which of the following code segments will he use to accomplish this task?

Options:

A.

try

{

NewConnection.Open();

}

catch(DBConcurrencyException exep)

{

//Error-handling code

}

B.

try

{

NewConnection.Open();

}

catch(SqlException exep)

{

//Error-handling code

}

C.

try

{

NewConnection.Open();

}

catch(DataException exep)

{

//Error-handling code

}

D.

try

{

NewConnection.Open();

}

catch(InvalidCastException exep)

{

//Error-handling code

}

Question 44

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.

Question 45

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 needs a thread that accepts an integer parameter. You write the following code segment in the application:

Thread myThread = new Thread(new ParameterizedThreadStart(doWork));

myThread.Start(125);

You are required to declare the signature of the doWork method. Which of the following method signatures will you use?

Options:

A.

public void doWork(int nCount)

B.

public void doWork(Object oCount)

C.

public void doWork()

D.

public void doWork(Delegate oCount)

Question 46

Maria works as a Software Developer for MarcLync Inc. She creates an XML Web service, named MyWebService, using Visual Studio .NET. Maria wants to debug MyWebService. Therefore, she attaches a debugger to the Web service process. However, Maria notices that whenever MyWebService is executed, it throws an exception System.Net.WebException after a certain time period. The exception displays the message "The current operation has timed-out." Maria wants to modify the code in MyWebService. Which of the following actions will Maria take in order to resolve this issue?

Options:

A.

Set the timeout value for the MyWebService call to zero.

B.

Set the timeout value for the MyWebService call to false.

C.

Add an exception handling block.

D.

Set the timeout value for the MyWebService call to -1.

Question 47

Kathy works as a Software Developer for BlueWell Inc. She creates a serviced component named

Com1. She wants to ensure that all the employees of the company are able to use Com1. Therefore, she wants to install Com1 in the Global Assembly Cache (GAC). Before the installation, she wants to register the serviced component manually with COM+. Which of the following tools will Kathy use to register Com1?

Options:

A.

Al.exe

B.

Regsvcs.exe

C.

Regasm.exe

D.

Mscorcfg.msc

Question 48

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 for the company. You need to validate the phone number passed to a class as a parameter in the application. Which of the following is the most effective way to verify that the format of the data matches a phone number?

Options:

A.

Regular expressions

B.

Nested If statements

C.

Use the String.Length property

D.

A try/catch block

Question 49

You work as an Enterprise Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET application using .NET Framework 3.5. You have already created a data contract for a WCF service and the ASP.NET Web application, which consumes the WCF service. The application has the following requirements:

l On low network bandwidth the serialized format of the data contract type should be minimum.

l The application uses AJAX to retrieve the data from the WCF service.

l Use the least amount of development effort.

What will you do?

Options:

A.

Use the XML format.

B.

Use the WPF format.

C.

Use the Binary Format Description format.

D.

Use the Java Script Notation format.

Question 50

You work as a Software Developer for ManSoft Inc. You use Microsoft Visual Studio to create a Web service named MyWebService. You create a SOAP message that is not secure in the Web service. You want to use the ReceiveSecurityFilter class in the Web service to handle the receiving and securing of SOAP messages. Which of the following code segments will you use to accomplish the task?

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

Options:

A.

public class MyReceiveSecurityFilter : ReceiveSecurityFilter

{

public MyReceiveSecurityFilter(string service, Boolean client)

{

base(service, client);

}

public override void ValidateMessageSecurity(SoapEnvelope envelope, Security security)

{

// Implementation validation here

}

}

B.

public class MyReceiveSecurityFilter : ReceiveSecurityFilter

{

public MyReceiveSecurityFilter(string service, Boolean client) : base(service, client)

{ }

public override void ValidateMessageSecurity(SoapEnvelope envelope, Security security)

{

// Implementation validation here

}

}

C.

public class MyReceiveSecurityFilter : ReceiveSecurityFilter

{

public MyReceiveSecurityFilter(string service, Boolean client)

{ }

public override void ValidateMessageSecurity(SoapEnvelope envelope, Security security)

{

// Implementation validation here

}

}

D.

public class MyReceiveSecurityFilter : ReceiveSecurityFilter

{

public MyReceiveSecurityFilter(string service, Boolean client) : base(service, client)

{ }

public void ValidateMessageSecurity(SoapEnvelope envelope, Security security)

{

// Implementation validation here

}

}

Question 51

You work as an Enterprise Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows client application that communicates with a business layer component using the .NET Framework. The business layer component includes a class named MyUtility as follows:

public class MyUtility

{

public MyUtility() { }

public void ChangeData() { }

}

The application must fulfill the following criteriA.

l Create instances of the MyUtility class only within the business component.

l The application should invoke the functions within the MyUtility class.

You evaluate the code of the MyUtility class and decide it requires modification. Which of the following modifications for the code will you recommend?

Options:

A.

Change the scope of the MyUtility class to private.

B.

Change the scope of the constructor to private.

C.

Change the scope of the constructor to internal.

D.

Change the scope of the MyUtility class to internal.

Question 52

Georgina works as a Software Developer for BlueChip Inc. She develops an application named App1 using Visual Studio .NET. The company wants her to deploy App1 to a customer's laptop. Georgina creates an assembly named Assembly1 to be stored in the Global Assembly Cache so that the Common Language Runtime (CLR) can locate and bind Assembly1.

As the application executes, the CLR locates the path of Assembly1 through the codebase setting. But, it finds no element in the app.config file, and fails to bind Assembly1. Now, the CLR tries to locate Assembly1 through probing. Which of the following will the CLR check to locate Assembly1?

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

Options:

A.

The culture attribute of the assembly

B.

Sub-directories in the application's root directory

C.

The application base or root directory

D.

The Gacutil.exe tool in the Global Assembly Cache

E.

Previously loaded assemblies

F.

The assembly's name

G.

The correct version of the assembly

Question 53

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

The application is used to exchange structured and type information on the Web using Soap. You want to use the BinaryFormatter and SoapFormatter classes to support RPCs and serialization of a graph of objects. Which of the following interfaces will the BinaryFormatter and SoapFormatter classes implement to accomplish the task?

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

Options:

A.

IFormatter

B.

IFormatable

C.

IRemotingFormatter

D.

IComparable

Question 54

Martha works as a Software Developer for HiTech Inc. She develops a Web application named

SalesApp that contains a Web page named MyWebForm1.aspx. The Web page contains validation controls for the Web server controls on the page. Martha wants the custom validation error message to display if the validation fails to call the validation control on the Web page. Which of the following actions will Martha take to accomplish the task?

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

Options:

A.

Call the Validate method of the validation control.

B.

Check the IsValid property of the validation control.

C.

Handle the Page_Init event handler.

D.

Handle the Page_Load event handler.

Question 55

Maria works as a Software Developer for BlueWell Inc. She develops an application, named App1, using Visual C# .NET. App1 contains a Form control, named Form1, for collecting users' contact information. Form1 contains a TextBox control, named TextBox1. App1 requires users to enter data in TextBox1. Maria writes a method, named Method1, to validate the entered data. She adds an ErrorProvider control, named Control1, to Form1. Maria wants to ensure that App1 notifies the users if they enter invalid data in TextBox1. Which of the following code will she use to accomplish this?

Options:

A.

public void TextBox1_Validating(object sender, System.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.UpdateBinding();

}

}

B.

public void TextBox1_Validating(object sender, System.ComponentModel.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.SetError(TextBox1, "Invalid Email Entry.");

}

}

C.

public void TextBox1_Validated(object sender, System.ComponentModel.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.UpdateBinding();

}

}

D.

public void TextBox1_Validated(object sender, System.ComponentModel.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.SetError(TextBox1, "Invalid Email Entry.");

}

}

Question 56

Sandra works as a Software Developer for ABC Inc. She develops a Web site on a client computer. She creates a custom control named CustControl1 on a Web page named

MicrosoftCert1. She wants to retain the custom control property information during several round trips to a server. She wants to ensure that the control property is retained even if the view state of the Web page is disabled at the page level. Which of the following client-based techniques for storing state management information will Sandra use to accomplish the task?

Options:

A.

Control state

B.

Cookie

C.

Query string

D.

Hidden field

E.

View state

Question 57

Sam works as a Software Developer for GenTech Inc. The company uses Visual Studio .NET as its application development platform. Sam develops an application named App1 using Visual C# .NET. App1 uses a non-COM DLL named Value1.dll, which contains unmanaged code. Sam wants to write a method named Method1 in Value1.dll. He wants to use Method1 for parsing a string into an array of string values and an array of numbers. He decides to specify three parameters for Method1. The first parameter will contain a static string value. After executing Method1, the second parameter will contain all string values found in the first parameter, and the third parameter will contain all integer values found in the first parameter. Sam wants to enable App1 to call this function. Which of the following code will he use to accomplish this?

Options:

A.

int Method1 Lib "Value1.dll"(string, out string, out int);

B.

int Method1 Lib "Value1.dll"(string, ref string, ref int);

C.

int Method1 Lib "Value1.dll"(ref string, string, int);

D.

int Method1 Lib "Value1.dll"(string, string, int);

Question 58

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. You need to execute a method named ProcAmount in the background of the application. The method requires that an integer value 101 is passed to it. You are required to pass an integer value 101 to start a background thread. Which of the following code segments should you use?

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

Options:

A.

thd.Start(101);

B.

ParameterizedThreadStart tStart; tStart = new ParameterizedThreadStart(ProcAmount);

Thread thd = new Thread(tStart);

C.

thd.Start();

D.

ThreadStart tStart = new ThreadStart(ProcAmount);

Thread thd = new Thread(tStart, 101);

Question 59

Mark works as a Software Developer for ABC Inc. He is participating in designing a .NET remoting component for an application that will be hosted on a load-balanced farm. For this, he creates a .NET remote object using Visual Studio .NET 2005. The .NET remote object is used to modify properties of a class. The class contains twenty properties. The .NET remote object is frequently used by client applications. He wants to minimize the network traffic. Which of the following actions will he take to accomplish the task?

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

Options:

A.

Use the Marshal-by-value objects.

B.

Use the SerializableAttribute attribute.

C.

Use the MarshalByRefObject class.

D.

Use the IDisposable interface.

Question 60

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create an ASP.NET AJAX application using .NET Framework 3.5. You have enabled debugging in your application to get error information. Now, you want to deploy the release version of the application. How will you set the application to release mode?

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

Options:

A.

Set the debug attribute of the @Page directive to false.

B.

Set the ScriptMode property of the ScriptManager control to Debug in pages that contain a ScriptManager control.

C.

In the Web.config file, set the compilation element's debug attribute to false.

D.

Set the ScriptMode property of the ScriptManager control to Release in pages that contain a ScriptManager control.

Question 61

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You create an application using .NET Framework. You use the application to create an assembly. Now you need to encrypt assembly data. The company has not provided encryption requirements to you. Which of the following symmetric cryptography classes will you use to accomplish this task?

Options:

A.

RSA

B.

3DES

C.

RijndaelManaged

D.

DES

E.

TDEA

Question 62

Mark works as a Software Developer for McRobert Inc. He develops an ASP.NET application, named App1, using Visual Studio .NET. App1 retrieves purchase orders data from a SQL Server database and displays it in a DataGrid control, named DataGrid1. Mark wants to enable users to sort data in ascending or descending order, whenever they click a column. He writes code to sort the data in DataGrid1 using the SortOrder property. The SortOrder property stores a value "ASC" for ascending order and "DESC" for descending order. Mark wants to preserve the value during postbacks. Which of the following properties of the Control class will Mark use to accomplish this?

Options:

A.

Cache

B.

State

C.

ViewState

D.

Application

Question 63

You work as a Software Developer for Mansoft Inc. You create an application. You want to use the application to encrypt data. You use the HashAlgorithmType enumeration to specify the algorithm used for generating Message Authentication Code (MAC) in Secure Sockets Layer (SSL) communications. Which of the following are valid values for HashAlgorithmType enumeration?

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

Options:

A.

RSA

B.

None

C.

DES

D.

MD5

E.

SHA1

F.

3DES

Question 64

You work as an ADO.NET Application Developer for ABC Inc. The company uses Microsoft Visual Studio .NET 2008 as its application development platform. You create an ADO.NET application by using .NET Framework 3.5. You are using the System.Linq.Expressions namespace. You need to specify an expression that applies a delegate or lambda expression to a list of argument expressions. Which of the following classes will you use to accomplish the task?

Options:

A.

ListInitExpression

B.

InvocationExpression

C.

MemberAssignment

D.

NewArrayExpression

Question 65

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. You utilize the built-in ASP.NET Web server controls in all the Web forms of the application. You access and modify the properties of all Web server controls in the code behind code of the Web forms. You are required to include custom client-side and AJAX behavior to the ASP.NET Web server controls. You are also required to ensure nominal effect on the current application code. What will you do?

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

Options:

A.

Add the extender controls alongside the ASP.NET Web server controls in the Web forms.

B.

Create a custom extender control for each built-in ASP.NET Web server control.

C.

Replace each built-in ASP.NET Web server control with the custom Web server control in the Web forms.

D.

Create a custom Web server control for each built-in ASP.NET Web server control.

E.

Create a UserControl control for each built-in ASP.NET Web server control.

F.

Add an UpdatePanel control in the Web forms for each built-in ASP.NET Web server control

Question 66

Allen works as a Software Developer for ManSoft Inc. He develops an application using Visual Studio .NET 2005. Only the employees of the company use the application. Allen wants to ensure that when a request on a page is made by a user the application asks for his authentication. Which of the following actions will Allen take to accomplish the task?

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

Options:

A.

Specify User.Identity to authenticate the user.

B.

Set the impersonate attribute of the element to true.

C.

Specify the username and password attributes.

D.

Set the impersonate attribute of the element to false.

Question 67

David works as a Software Developer for McRobert Inc. He develops a Windows-based application, named App1, using Visual C# .NET. The application contains a Form control, named Form1. He wants to write code to initialize class-level variables, named Var1, Var2, and Var3, as soon as Form1 is instantiated. Which of the following code will he use to accomplish this?

Options:

A.

private void Form1_Initialize(System.Object sender, System.EventArgs e)

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

B.

private void Form1_Load(System.Object sender, System.EventArgs e)

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

C.

private void Form1_New(System.Object sender, System.EventArgs e)

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

D.

private void Form1_Create(System.Object sender, System.EventArgs e)

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

Question 68

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Web application using .NET Framework 2.0. You configure the application at the following levels:

l Root Web

l Web application root directory

l Web site

l Web application subdirectory

In which of the following files will these levels be stored?

Options:

A.

Proxy auto-config

B.

ApplicationName.config

C.

Manhine.config

D.

Web.config

Question 69

You work as a Software Developer for ManSoft Inc. You create an assembly. You place the assembly in a specific folder. Which of the following classes can you use to determine whether the assembly was located in a specific folder?

Each correct answer represents a complete solution. Choose two.

Options:

A.

UrlMembershipCondition

B.

ApplicationDirectoryMembershipCondition

C.

GacMembershipCondition

D.

SiteMembershipCondition

Question 70

Sam works as a Software Developer for GenTech Inc. He develops an application named App1 using Visual Basic .NET. App1 uses a non-COM DLL named Value1.dll, which contains unmanaged code. Sam writes a method named Method1 in Value1.dll as follows:

Method1 Lib "Value1.dll"(ByVal InputVar As String, ByRef WordsVar As String, ByRef

NumbersVar As Integer) As Integer

Sam wants to use Method1 for parsing a string into an array of string values and an array of integers. Sam wants to enable App1 to call this function. Which of the following statements about the method are true?

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

Options:

A.

The value of the first parameter cannot be changed by a procedure or a function.

B.

The second parameter will contain all string values found in the first parameter.

C.

The third parameter will contain all integer values found in the second parameter.

D.

The third parameter will contain all string values found in the second parameter.

Question 71

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Web application using .NET Framework 2.0. You add a Web Form that contains a button named bCancel. The button allows users to exit the form. When users click the button, validation should not occur. However, during testing you find that clicking the button does not allow users to exit the form. You need to ensure that users can always exit the page. What will you do?

Options:

A.

Set the CausesValidation property of the bCancel button to false.

B.

Set the AccessibleName property of the validation controls on the Web Form to "false".

C.

Set the ControlToValidate property of the validation controls on the Web Form to the ID of the control.

D.

Set the Enabled property of the validation controls on the Web Form to false.

Question 72

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating an application for a Bank using the .NET Framework. You create a method that gets the images of cancelled checks and displays them. You presently have access to a method that reads the images from a SQL server database as a sequence of bytes. You need to transfer the image from the SQL server database to a form with the least amount of temporary buffers and files. Which of the following classes will you use to accomplish this task?

Options:

A.

FileStream

B.

NetworkStream

C.

BufferedStream

D.

MemoryStream

Demo: 72 questions
Total 491 questions