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

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

Demo: 73 questions
Total 491 questions

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

Question 1

Which of the following syntaxes is used for the EncryptionAlgorithm property of the Message class?

Options:

A.

[MessagingDescriptionAttribute("MessageEncryptionAlgorithm")]

public EncryptionAlgorithm : EncryptionAlgorithm { }

B.

[MessagingDescriptionAttribute("MessageEncryption")]

public EncryptionAlgorithm EncryptionAlgorithm { }

C.

[MessagingDescriptionAttribute("MessageEncryption")]

public EncryptionAlgorithm EncryptionAlgorithm { get; set; }

D.

[MessagingDescriptionAttribute("MessageEncryptionAlgorithm")]

public EncryptionAlgorithm : EncryptionAlgorithm { get; set; }

Question 2

In which of the following objects are session variables stored?

Options:

A.

SessionStateStoreData

B.

SessionStateModule

C.

SessionStateItemCollection

D.

SessionStateStoreProviderBase

Question 3

John works as a Web developer for HiTech Inc. He develops an application named MyApp by using Visual C# .NET. John uses a SQL Server database. He writes the following code:

OleDbCommand cmd = new OleDbCommand();

cmd.CommandText = "UPDATE Employees SET Rank = 'Senior' WHERE Basic > 10000";

cmd.ExecuteNonQuery();

Now he wants to improve the performance of the program code. Which of the following actions will he perform to accomplish the task?

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

Options:

A.

Use database indexing.

B.

Use an OleDbDataReader object to execute the program code.

C.

Use a Cache object to execute the program code.

D.

Use a SqlCommand object instead of an OleDbCommand object.

E.

Use a stored procedure instead of the CommandText property.

F.

Use the Prepare method on the OleDbCommand object before executing the program code.

Question 4

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 5

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.PermitOnly, Unrestricted = true)]

B.

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

C.

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

D.

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

Question 6

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 7

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 8

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 are creating an applications using .NET Framework 2.0. You want to allow users to view various details of a given unmanaged code. What will you do to accomplish the task?

Options:

A.

Use a COM/DCOM server.

B.

Use the Dispinterface.

C.

Use the Makecert.exe.

D.

Use the dumpbin.exe.

Question 9

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You have recently finished development of an ASP.NET Web application using the .NET Framework 3.5. You host the application on a Web farm that consists of three Web servers. You should configure the ASP.NET application for session state to meet the following requirements:

l Session state data should not be lost if a server fails.

l Session state must be maintained across browser requests by the same user.

You are required to configure the Web.config file to meet these requirements. Which of the following configurations will you use?

Options:

A.

B.

C.

D.

Question 10

Which of the following classes limits the number of threads that can access a resource or pool of resources concurrently?

Options:

A.

Semaphore

B.

Mutex

C.

Thread

D.

Monitor

Question 11

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 12

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You have recently finished development of Web services using the .NET Framework. The access control to Web services is part of your accountability. You are currently revealing an existing class as a XML Web service. You are required to ensure that the XML Web service is exclusively accessible to Web service clients within the ABC Inc. domain. To fulfill this requirement you want to change the access modifiers on methods that must be represented as Web methods. What will you do to accomplish this task?

Options:

A.

Use the Public access modifier for each Web method.

B.

Use the Private access modifier for each Web method.

C.

Use the Internal or Friend access modifier for each Web method.

D.

Use the Protected access modifier for each Web method.

Question 13

Allen works as a Software Developer for ABC Research Center. This research center has its subsidiaries in different cities. Allen 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. Allen decides to use generic rolebased security to secure the SoilTestDetails method from unauthorized users.

Allen 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 Allen use to accomplish the task?

Options:

A.

Dim GenIdentity As GenericIdentity = New GenericIdentity("Generic", "Custom")

Dim GesRoles() As String= {"GeoSurvey"}

Dim GeoPrincipal As GenericPrincipal = New GenericPrincipal(GenIdentity, GeoRoles)

Thread.CurrentPrincipal = GeoPrincipal

B.

Dim GeoIdentity As IIdentity = New GenericIdentity("Generic", "GeoSurvey")

Dim GeoPrincipal As IPrincipal = New WindowsPrincipal((WindowsIdentity) GeoIdentity)

Thread.CurrentPrincipal = GeoPrincipal

C.

Dim GeoIdentity As IIdentity = New GenericIdentity("Generic", "Custom")

Dim WinGeoIdentity As WindowsIdentity = (WindowsIdentity) GeoIdentity

Dim GeoRoles() As String = {"GeoSurvey"}

Dim GenGeoPrincipal As GenericPrincipal = New GenericPrincipal(WinGeoIdentity, GeoRoles)

WindowsIdentity.Impersonate(WinGeoIdentity.Token)

D.

Dim MyGenericIdentity As System.Security.Principal.IIdentity = New GenericIdentity("Generic",

"Custom")

Dim GeoRoles() As String = {"GeoSurvey"}

GenericPrincipal GenGeoPrincipal = new GenericPrincipal(MyGenericIdentity, GeoRoles);

MyGenericIdentity = WindowsIdentity.GetCurrent();

Question 14

Which class allows checks against the active principal using the language constructs defined for the declarative and imperative security actions?

Options:

A.

IPrincipal

B.

CodeAccessPermission

C.

PrincipalPermission

D.

SecurityPermission

Question 15

Sam works as a Software Developer for GenTech Inc. He creates an ASP.NET page, named Page1, for a college Web site. Page1 is used to enroll new applicants to a certification course offered by the college. In order to get admission to the course, an applicant's age must be between eighteen and twenty-five. The page contains several TextBox controls that are used by applicants to feed their personal details. The data entered by each applicant is then used to check the eligibility of the applicant.

One of the TextBox controls on the page is named txtDateofBirth. Sam wants to verify that the applicants meet the age requirement. He wants to perform validation both on the server-side and on the client-side. In order to validate the age, he adds a CustomValidator control, named CValidator, to the page and sets its ControlToValidate property to txtDateofBirth. Which of the following will Sam use to accomplish the task?

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

Options:

A.

ClientValidationFunction event

B.

ServerValidate property

C.

ServerValidate event

D.

ClientValidationFunction property

Question 16

Which of the following is a reference type in Visual C#?

Options:

A.

primitive types

B.

strings

C.

enums

D.

structures

Question 17

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 18

You work as a Software Developer for ABC Inc. You develop an application using Visual Studio .NET 2005. You want to print the contents of a document named MyFile1.doc located on the local computer. Therefore, you use the printing controls in the application. Which of the following events will you use in the application code to accomplish the task?

Options:

A.

EndPrint

B.

QueryPageSettings

C.

PrintPage

D.

BeginPrint

Question 19

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a class library using the .NET Framework. The library will be used to open the NSCs of computers. Later, you will set up the class library to the GAC and provide it Full Trust permission. You write down the following code segments for the socket connections:

SocketPermission permission = new SocketPermission(PermissionState.Unrestricted);

permission.Assert();

A number of the applications that use the class library may not have the necessary permissions to open the network socket connections. Therefore, you are required to withdraw the assertion. Which of the following code segments will you use to accomplish the task?

Options:

A.

permission.PermitOnly();

B.

CodeAccessPermission.RevertDeny();

C.

permission.Deny();

D.

CodeAccessPermission.RevertAssert();

E.

permission.Demand();

Question 20

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 21

You work as a Software Developer for ABC Inc. You create a Console application to create multiple satellite assemblies. Which of the following statements about satellite assemblies are true?

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

Options:

A.

They do not contain any executable code.

B.

They are used to deploy language-specific resources for an application.

C.

The Assembly Linker tool is used to compile .resources files into satellite assemblies.

D.

An application can have only one satellite assembly.

Question 22

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 need to save a graphical object from the application. The graphical object is a collection of x and y points, each represented by using a single precision floating point number. You want to use the least amount of disk space by the saved object. Which the following classes will you use to accomplish this task?

Options:

A.

XmlWriter

B.

StreamWriter

C.

TextWriter

D.

BinaryWriter

Question 23

David works as a Software Developer for GenTech Inc. He defines an interface, named Interface1.

Interface1 contains the following code:

public interface Interface1

{

// Code goes here.

}

David creates a serviced component, named Component1, which implements Interface1. Which of the following code will he add to Component1 to ensure that it is built properly?

Options:

A.

[ClassInterface(ClassInterfaceType.AutoDual)]

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}

B.

[GuidAttribute("9ED54F84-A89D-4fcd-A854-44251E925F09")]

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}

C.

[ClassInterface(ClassInterfaceType.AutoDispatch)]

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}

D.

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}

Question 24

Charles works as a Web Developer for Cyber Net Inc. The company frequently receives production information from external vendors in the form of XML data. Charles stores these XML data in a disk container of the Web server as .xsd schema files and .xdr schema files. There are specific rules for writing XML codes to define the structure and data types for XML documents. Which of the following criteria should NOT be considered while writing an XML document?

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

Options:

A.

A well-formed XML document should contain a start tag but not necessarily an end tag.

B.

An XML document must enclose the beginning and ending points of a tag by using the symbols '<' and '>' respectively.

C.

A well-formed XML document should contain a start tag and an end tag.

D.

An XML document should be specified according to the application or business requirement s.

E.

An XML document should have predefined elements and attributes.

Question 25

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You need to read the entire contents of a file named Msg.txt into a single string variable using .NET Framework. Which of the following code segments will you use to accomplish the task?

Options:

A.

string NewResult = string.Empty;

StreamReader Strreader = new StreamReader("Msg.txt");

While (!Strreader.EndOfStream) {

NewResult += Strreader.ToString();

B.

string NewResult = null;

StreamReader Strreader = new StreamReader("Msg.txt");

NewResult = Strreader.ReadLine();

C.

string NewResult = null;

StreamReader Strreader = new StreamReader("Msg.txt");

NewResult = Strreader.ReadToEnd();

D.

string NewResult = null;

StreamReader Strreader = new StreamReader("Msg.txt");

NewResult = Strreader.Read().ToString();

Question 26

Adam works as a Software Developer for ABC Inc. He creates an ASP.NET application, named MyApp. During beta testing of MyApp, he ensures that both developers and beta testers see the actual text of error messages. Adam performs beta testing of other applications on the same test server. All the other applications display ASP.NET error messages. After completing beta testing, Adam promotes the beta test server to a production server. He wants all the applications to display a single, userfriendly error message. Adam also wants to configure MyApp and the production server to meet these goals. What will he do to accomplish the required task with minimum administrative effort?

Options:

A.

In the Web.config file for MyApp, add the following element:

B.

In the Machine.config file, add the following element:

C.

In the MyApp.config file, add the following element:

D.

In the MyApp.config file, add the following element:

E.

In the Web.config file for MyApp, add the following element:

F.

In the Machine.config file, add the following element:

Question 27

You work as a Software Developer for ABC Inc. You create a SQL server database named DATA1 that will manage the payroll system of the company. DATA1 contains two tables named EmployeeData and Department. While EmployeeData records detailed information of the employees, Department stores information about the available departments in the company. EmployeeData consists of columns that include EmpID, EmpName, DtOBrth, DtOJoin, DeptNo, Desig, BasicSal, etc. You want to ensure that each employee ID is unique and is not shared between two or more employees. You also want to ensure that the employees enter only valid department numbers in the DeptNo column. Which of the following actions will you perform to accomplish the task?

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

Options:

A.

Define views in the database.

B.

Add constraints to the EmployeeData table.

C.

Define triggers in the EmployeeData table.

D.

Define indexes in the EmployeeData table.

E.

Add stored procedures by using Transact-SQL queries.

Question 28

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You create a Web service application using .NET Framework. The Web service provides confidential data of employees to applications that manage access to company facilities. The Web service is accessible by using TCP and is sheltered by using WSE 3.0. The company has implemented fingerprint readers to grant employees access to the facilities. All the captured images of the employees' fingerprints are retained by the Web service application. You must make certain that the existing WSE encryption policy can be applied to the fingerprint image. You are required to provide the solution that must reduce the size of the Web service message.

What will you do to accomplish this task?

Options:

A.

Configure the Web service to use base64 encoding to pass the binary fingerprint image.

B.

Configure the Web service to use Message Transmission Optimization Mechanism to pass the binary fingerprint image.

C.

Create a SOAP filter to manage encryption for the message.

D.

Create a SOAP extension to manage encryption for the message.

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 creating an application using .NET Framework 2.0. The application will perform security related operations. You want to manage the role-based security in the application. What will you do to accomplish the task?

Options:

A.

Use the StackTrace property.

B.

Use the Process class.

C.

Use the WindowsIdentity class.

D.

Use the WindowsPrincipal class.

Question 30

You work as a Software Developer for ABC Inc. You have created a console application that uses two threads, named thread1 and thread2. You need to modify the code to prevent the execution of thread1 until thread2 completes its execution. Which of the following steps will you take to accomplish this task?

Options:

A.

Call the SpinWait() method of thread1.

B.

Use a WaitCallBack delegate to synchronize the threads.

C.

Call the sleep() method of thread1.

D.

Configure thread1 to run at a lower priority.

E.

Configure thread2 to run at a higher priority.

Question 31

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 32

John works as a Web Developer for ABC Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. The application will be used in the Sales department to generate monthly reports. John wants to deploy the application on the company's intranet. The company uses Microsoft Windows authentication. John wants to deny access to all the members of the Guest1 role. Which of the following attributes will he use in the <authorization> element of the application's Web.config file to accomplish the task?

Options:

A.

B.

C.

D.

Question 33

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 34

You are working on an ASP.NET application that will handle shopping cart for online users. You wish to generate images of all your company's products dynamically on one of the application's Web pages. You need to modify your configuration settings file for this purpose. Which of the following sections of the configuration file will you use to accomplish the task?

Options:

A.

B.

C.

D.

Question 35

You work as a Software Developer for ABC Inc. You use C# .NET to develop a windows application. The application will implement a role-based authorization scheme that is based on a Microsoft SQL Server database of user names. Users will enter their names in a text box named UserName. You must ensure that users are assigned the supervisor role and the PG role by default. Which of the following code segments will you use to accomplish this task?

Options:

A.

GenericIdentity identity =

new GenericIdentity(UserName.Text);

string[] RoleArray = {"Supervisor", "PG"};

WindowsPrincipal principal = new WindowsPrincipal(identity);

B.

WindowsIdentity identity =

new WindowsIdentity.GetAnonymous();

string[] RoleArray = {"Supervisor", "PG"};

WindowsPrincipal principal = new GenericPrincipal(identity, RoleArray);

C.

GenericIdentity identity =

new GenericIdentity(UserName.Text);

string[] RoleArray = {"Supervisor", "PG"};

GenericPrincipal principal = new GenericPrincipal(identity, RoleArray);

D.

WindowsIdentity identity =

new WindowsIdentity.GetCurrent();

string[] RoleArray ={"Supervisor", "PG"};

GenericPrincipal principal = new GenericPrincipal(identity, RoleArray);

Question 36

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You are presently busy implementing a custom trace that logs errors and warnings in a MS SQL Server database. The implementation should allow different applications to decide whether errors or warnings should be logged at a specified time. You install the assembly that contains the trace listener in the GAC on an application server. You want to enable all Web services on the application server to utilize the trace listener by default. You need to ensure that the implementation does not force Microsoft Windows Forms applications that run on the server to utilize the trace listener. What will you do to accomplish this task?

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

Options:

A.

Add the trace listener to the Web.config file for every Web service.

B.

Add the trace listener to the global Web.config file.

C.

Specify trace switches for every Web service in the Web.config file.

D.

Add the trace listener to the machine.config file.

E.

Specify trace switches in the machine.config file.

Question 37

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 Trace.WriteLine method

B.

The EventLog.WriteEntry method

C.

The EventLog.EventLogSource property

D.

The EventLog.Source property

Question 38

You work as a Software Developer for ManSoft Inc. The company uses Visual Studio.NET 2005 as its application development platform. You have recently created an application that includes the code shown below.

string str1 = "ABC";

string str2 = "u";

str2 += "Certify";

Console.WriteLine(str1 == str2);

Console.WriteLine((Object) str1 == (Object) str2);

Console.WriteLine(str1.Equals(str2));

What will be the output of the above code?

Options:

A.

True

True

True

B.

True

False

True

C.

False

False

False

D.

False

True

False

Question 39

You work as a Software Developer for ManSoft Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application that will be used by all the branches of the company. You use the Code Access Security to manage the security of the application. The application requires to obtain minimum permissions to execute properly. Which of the permissions will you grant to accomplish the task?

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

Options:

A.

Permissions View

B.

Identity Permissions

C.

Code Access Permissions

D.

Role-Based Permissions

Question 40

You work as a Software Developer for ManSoft Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You are creating a global application that will be used by all the branches of the company. You want to perform the encoding of Unicode characters. Which of the following classes will you use to accomplish the task?

Each correct answer represents a complete solution. Choose three.

Options:

A.

UnicodeEncoding

B.

ASCIIEncoding

C.

UTF32Encoding

D.

UTF8Encoding

Question 41

Mark works as a Software Developer for BlueWell Inc. He develops four Windows-based applications using Visual Studio .NET. All the applications use an assembly, named Assembly1. Mark deploys the applications on the company's intranet. Later, he modifies Assembly1 and wants to ensure that all the applications use the latest version of Assembly1. Which of the following files will Mark use to accomplish this?

Options:

A.

Publisher policy configuration file

B.

Security configuration file

C.

Machine configuration file

D.

Application configuration file

Question 42

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 43

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 44

You work as a Database Administrator for ABC Inc. The company has a SQL Server 2000 computer. One of the databases on the server contains a table named Employees, for storing information about employees in the company. There are two employees, Joe and Rick, to whom you want to give additional responsibilities. You want Joe to be allowed to modify only the E-mail column of the table, and Rick should be allowed to modify only the Salary column of the table. Neither Joe nor Rick should be allowed to have permission on the Employees table.

You want to ensure that the above rule is followed strictly. What will you do to accomplish this?

Options:

A.

Create a user-defined function to modify data.

B.

Create a RULE on both the columns.

C.

Create a stored procedure to modify data

D.

Create a CHECK constraint on both the columns.

Question 45

You work as a Software Developer for ABC Inc. You have created a console application that uses two threads, named thread1 and thread2. You need to modify the code to prevent the execution of thread1 until thread2 completes its execution. Which of the following steps will you take to accomplish this task?

Options:

A.

Use a WaitCallBack delegate to synchronize the threads.

B.

Call the sleep() method of thread1.

C.

Call the SpinWait() method of thread1.

D.

Configure thread1 to run at a lower priority.

E.

Configure thread2 to run at a higher priority.

Question 46

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.

An unmanaged code.

B.

A managed code.

C.

The element.

D.

The element.

Question 47

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. You are using Soap to exchange structured and type information on the Web. You want to ensure that all the parameters are contained within the single element in a SOAP message body. Which of the following Soap message formatting types will you use to accomplish the task?

Options:

A.

Document-Based Body Formatting

B.

Literal Parameter Formatting

C.

Encoded Parameter Formatting

D.

RPC-Based Body Formatting

Question 48

You work as an Enterprise 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 use cross-page posting to redirect users to another page. You want to access the public property values from the source page in the target page. Which of the following actions can you perform to accomplish the task?

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

Options:

A.

Include an @PreviousPageType directive in the target page. Set the VirtualPath attribute to the path of the source page and set the TypeName attribute to the type name of the previous page.

B.

Include an @Master directive in the target page.

C.

Include an @PreviousPageType directive in the target page and set the VirtualPath attribute to the path of the source page.

D.

Include an @Register directive in the target page that references the source page.

Question 49

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.

RegularExpressionValidator

B.

RequiredFieldValidator

C.

RangeValidator

D.

CustomValidator

Question 50

John works as a Web developer for HiTech Inc. He develops an application named MyApp by using Visual C# .NET. John uses a SQL Server database. He writes the following code:

OleDbCommand cmd = new OleDbCommand();

cmd.CommandText = "UPDATE Employees SET Rank = 'Senior' WHERE Basic > 10000"; cmd.ExecuteNonQuery();

Now he wants to improve the performance of the program code. Which of the following actions will he perform to accomplish the task?

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

Options:

A.

Use a Cache object to execute the program code.

B.

Use a SqlCommand object instead of an OleDbCommand object.

C.

Use the Prepare method on the OleDbCommand object before executing the program code.

D.

Use an OleDbDataReader object to execute the program code.

E.

Use database indexing.

F.

Use a stored procedure instead of the CommandText property.

Question 51

Janet works as a Software Developer for Blue Well Inc. The company management wants its project team members to be registered so that they can access the company's Website. To ensure that the team members can work together effectively, Janet creates an XML Web service named MyWebService by using Visual Studio .NET. She wants to ensure that the team members have a valid username and password in order to maintain strict security against unauthorized access. Which of the following authentication methods will Janet implement in her application to accomplish this task?

Options:

A.

Multi-factor authentication

B.

Digest authentication

C.

Database authentication

D.

Network authentication

Question 52

You work as a Software Developer for ABC Inc. You create a Web service named MyWebService using Visual Studio .NET. You implement a public Web method. You make the method accessible through a Web service application by attaching the WebMethod attribute to the public method. The public method is stored in the class file of the Web service file. When you create a Web service project using the Web service project template, by default, one public method named HelloWorld is created. The HelloWorld public method does not become available through the Web service until you attach the WebMethod attribute. The method must be applied to each method declaration. Now, you want to configure a Web service method. You want to ensure that the Web method performs updates on more than one databases or if the sequence of updates is critical to the overall success of the Web method. Which of the following properties will you use to accomplish this task?

Options:

A.

TransactionOption

B.

Description

C.

BufferResponse

D.

EnableSession

Question 53

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You are creating an ASP.NET Web application using .NET Framework 3.5. The application will be accessed by users from remote locations over the Internet. You need to use ASP.NET role management. You must ensure that any authorization information cached on remote client computers is as secure as possible. What will you do?

Options:

A.

Use the RsaProtectedConfigurationProvider class.

B.

Use the DpapiProtectedConfigurationProvider class.

C.

Set the cookieProtection attribute to Validation in the roleManager element of the Web.conf ig file.

D.

Set the cookieProtection attribute to Encryption in the roleManager element of the Web.con fig file.

Question 54

You work as a Software Developer for ABC Inc. You create a Web page named MyWebForm1.aspx that displays a student's registration form. The page uses three CheckBox controls and several other Web server controls on the page. The CheckBox controls contain information about the educational qualifications. You want to ensure that a message containing educational status and relevant information is displayed as soon as a user clicks the CheckBox controls. Which of the following actions will you take to accomplish the task?

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

Options:

A.

Set the AutoPostBack property to false.

B.

Use the CheckedChanged event.

C.

Set the CausesValidation property to false.

D.

Set the CausesValidation property to true.

E.

Set the Checked property to true.

F.

Set the AutoPostBack property to true.

Question 55

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 application using .NET Framework 3.5. The application captures account information. The account number has the following specifications:

l It holds literal and input characters of the alphanumeric type.

l It has a predefined format.

You must ensure that the account number is in the correct format. You must also ensure that only input characters are accepted from users. What will you do?

Options:

A.

Use a RichTextBox control and create a regular expression to validate the format.

B.

Use a TextBox control and bind it to a string that has the required format.

C.

Use a MaskedTextBox control and create a mask to validate the format.

D.

Use a TextBox control and create a regular expression to validate the format.

Question 56

Mark works as a Software Developer for BlueWell Inc. He is required to create a class, named Members. Each element of this class has a unique ID stored in a database field, named Member_ID. Which of the following options will he use to represent Member_ID, while designing the Members class?

Options:

A.

Event

B.

Property

C.

Method

D.

Function

Question 57

You work as a Software Developer for ABC Inc. You develop an application using Visual Studio .NET 2005. You want to print the contents of a document named MyFile1.doc located on the local computer. Therefore, you use the printing controls in the application. Which of the following events will you use in the application code to accomplish the task?

Options:

A.

BeginPrint

B.

QueryPageSettings

C.

PrintPage

D.

EndPrint

Question 58

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 59

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

}

Question 60

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.

Location

C.

Button

D.

X

E.

Delta

F.

Clicks

Question 61

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".

Question 62

You work as a Software Developer for ManSoft Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You are creating a global application that will be used by all the branches of the company. You want to perform the encoding of Unicode characters with error detection capability. Which of the following classes will you use to accomplish the task?

Each correct answer represents a complete solution. Choose three.

Options:

A.

UTF8Encoding

B.

UnicodeEncoding

C.

UTF7Encoding

D.

UTF32Encoding

E.

ASCIIEncoding

Question 63

Which of the following is used, if a reference to an object is required to be made when it is passed from one application to another?

Options:

A.

Marshal By Reference object

B.

Singleton object

C.

SingleCall object

D.

Marshal By Value object

Question 64

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 65

Emily works as a Programmer in an Eye Research Center. The center keeps several records such as case history records for old patients and newly admitted patients, and records for outdoor patients. The Head of the Research Center wants Emily to generate reports for each outdoor patient with minimum network traffic. Emily develops an application named OutdoorPatientReport by using Visual Studio .NET. She needs to utilize the data repository as maintained by the center.

She wants to ensure that the application is displayed to all the doctors. Which of the following actions will Emily take to accomplish this task?

Options:

A.

Use Microsoft SQL Server stored procedures for data calculations.

B.

Implement a batch processing system for data calculations.

C.

Create more than one database for data manipulations.

D.

Use SQL Server indexes to optimize data calculations.

Question 66

Maria works as a Software Developer for BlueWell Inc. She develops an application named App1 using Visual Studio .NET 2005. App1 contains several pages. Maria wants to use components that provide services and resources. She also wants to release the resources explicitly by the components. Which of the following methods will she use to accomplish this task?

Options:

A.

The Finalize method of the BackgroundWorker class

B.

The Dispose method of the BackgroundWorker class

C.

The Dispose method of the Component class

D.

The Finalize method of the Component class

Question 67

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 will manage rental properties for a property management agency. When a property is rented, a lease agreement is created. At that time a new lease is entered into the application, the starting date of the lease may not yet be known.

You need to write code that stores the lease start date entered by a user in a variable. The variable that stores the lease start date should contain no value, by default. If no lease start date is entered, the variable should have no value assigned to it.

Which code segment should you choose?

Options:

A.

DateTime? leaseStartDate = null;

B.

DateTime leaseStartDate = null;

C.

DateTime? leaseStartDate = new DateTime();

D.

DateTime leaseStartDate = new DateTime();

Question 68

Mark works as a Web Developer for ABC Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. MyApp1 allows users to view and purchase company products.

It includes several pages. The start-up page of the application is Page1.aspx. He configures the application's Web.config file to use form-based authentication.

Mark wants users to log on to Page1.aspx by providing their user names and passwords. To accomplish this, he creates an ASP.NET page named UsersLogIn.aspx that allows each user to specify a user name and password. He then writes the following syntax in the Web.config filE.

<authentication mode="Forms">

<forms name="MyName"

loginUrl="/UsersLogIn.aspx"

protection="All"

timeout="60"

slidingExpiration="true">

</authentication>

What will be the result?

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

Options:

A.

The session will expire after 60 seconds.

B.

The session will expire after 60 minutes.

C.

The session will expire after 60 hours.

D.

The session lifetime will be reset periodically.

E.

The session will never expire.

F.

Once the session lifetime is set, it will not change.

Question 69

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 the .NET Framework. You create a class named Master that contains numerous child objects. The Master class contains a method named ProcessChild that executes actions on the child objects. The Master class objects will be serializable. You must ensure that the ProcessChild method is executed subsequent to the Master class object and all its child objects are reformed. Which of the following actions will you take to accomplish the task?

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

Options:

A.

Create an OnDeserialization method that calls the ProcessChild method.

B.

Apply the OnDeserializingAttribute class to the ProcessChild method.

C.

Specify that the Master class implements the IDeserializationCallback interface.

D.

Apply OnSerializedAttribute to the ProcessChild method.

E.

Specify that the Master class inherits from the ObjectManager class.

Question 70

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You have recently finished development of an ASP.NET Web application using the .NET Framework 3.5. You host the application on a Web farm that consists of three Web servers. You should configure the ASP.NET application for session state to meet the following requirements:

l Session state data should not be lost if a server fails.

l Session state must be maintained across browser requests by the same user.

You are required to configure the Web.config file to meet these requirements. Which of the following configurations will you use?

Options:

A.

B.

C.

D.

Question 71

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You have recently finished development of an application using .NET Framework. The application used two threads named threadOne and threadTwo. You are required to modify the code of the application to prevent the execution of threadOne until threadTwo completes execution. What will you do to accomplish this task?

Options:

A.

Use a WaitCallback delegate to synchronize the threads.

B.

Configure threadTwo to run at a higher priority.

C.

Configure threadOne to run at a lower priority.

D.

Call the Sleep method of threadOne.

E.

Call the SpinLock method of threadOne

Question 72

Samantha works as a Software Developer for InfoWorld Inc. She develops a Web page named SalesReport.aspx for the employees of the company. However, she wants to ensure that all the requests for a particular employee are not stored on the server's memory. She also wants to ensure that no data is lost even after each user session has expired. Which of the following actions will Samantha take to accomplish the task?

Options:

A.

Use a cookieless session state for storing information.

B.

Use the profile properties feature for storing information.

C.

Use the application state for storing information.

D.

Use the session state with cookie for storing information.

Question 73

Henry works as a Software Developer for InfoTech Inc. He develops a Web application for registered employees of the company. The application requires accessing several XML data stored in a database named Database1. However, Henry wants to ensure that the XML data is validated before being accessed. Which of the following classes will Henry use to validate the XML data?

Options:

A.

XmlValidatingReader

B.

XmlTextReader

C.

XmlNodeReader

D.

XmlReader

Demo: 73 questions
Total 491 questions