Weekend Sale Limited Time Flat 70% Discount offer - Ends in 0d 00h 00m 00s - Coupon code: 70spcl

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

Page: 1 / 49
Total 491 questions

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

Question 1

Dennis works as a Software Developer for BlueWell Inc. He develops an application, named App1, using Visual C# .NET. App1 contains a class, named Class1, which is stored in a namespace, named BlueWell.Namespace1. Dennis wants to create another class, named Class2, and use Class1 from Class2. For this, he wants to define an alias, named Alias1, and use it in Class2.

Which of the following statements will Dennis use to define Alias1?

Options:

A.

BlueWell.Namespace1.Class1 : Alias1;

B.

BlueWell.Namespace1.Class1, Alias1;

C.

using Alias1 = BlueWell.Namespace1.Class1;

D.

Alias1 = BlueWell.Namespace1.Class1;

Question 2

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are developing an application for the customer support using the .NET Framework. The customer support application accepts phone numbers. While running a report, you notice that the phone numbers displayed do not pursue similar format. Furthermore, there are cases of missing digits and missing area codes. You are required to ensure that the phone numbers are entered in the following format:

(###) ###- ####

You need to accomplish this task with the least amount of code. What will you do?

Options:

A.

Use the CustomValidator control.

B.

Replace all TextBox controls that are used for phone number input with MaskedTextBox con trols.

C.

Write code that uses a regular expression.

D.

Use the RegularExpressionValidator control.

Question 3

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 4

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 .NET Framework 3.5. You deploy the application on a test server and enable the debugging. The application is hosted in IIS 6.0 and uses the default authentication. Integrated

Windows authentication is enabled and anonymous access is disabled. You have not got the administrative rights on the test server. The following configuration is present in the Web.config filE.

</authorization>

You are required to configure the Web.config file to debug the application from your development computer. Which of the following configurations will you use in the Web.config file?

Options:

A.

B.

C.

</authorization>

D.

</authorization>

Question 5

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 6

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 7

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create a Windows Forms application using .NET Framework 3.5. You add a button control to a form named form1. You want to retrieve more information about the mouse event. You use the MouseClick event in your application. Which of the following parameters will you pass to the event handler of the MouseClick event?

Options:

A.

An object parameter representing the sender of the event and an instance of KeyEventArgs

B.

An object parameter representing the sender of the event and an EventArgs parameter

C.

An object parameter representing the sender of the event and an instance of KeyPressEven tArgs

D.

An object parameter representing the sender of the event and an instance of MouseEventA rgs

Question 8

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 9

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 10

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 11

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 12

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.

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 13

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. The application contains a class named globalInfo. You need to serialize all public and nonpublic data of the globalInfo class to ensure that the class generates the minimum byte stream so that the minimum load is placed upon network resources. What will you do?

Options:

A.

Use the XmlSerializer class.

B.

Use the BinaryFormatter class.

C.

Use the SoapFormatter class.

D.

Use the IXmlSerializable interface.

Question 14

Allen works as a Software Developer for ABC Inc. He develops an application using Visual Studio .NET

2005. The application will be used for the registration of employees by filling a form provided in the application. The form contains the following fields:

l First Name

l Last Name

l Date of Birth

l E-mail

He provides a TextBox control for each field. He wants an employee to be able to receive a user-defined error message when he makes a wrong entry. Which of the following properties is mandatory if a

CustomValidator control is used to validate an entry?

Options:

A.

EnableViewState

B.

EnableTheming

C.

ErrorMessage

D.

IsValid

Question 15

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 .NET Framework 3.5. The company's sales employees access the application, which is deployed on a Web server. You want to secure the Web server. To secure the Web server, you want to use cookieless forms authentication. Which of the following properties will you use to accomplish the task?

Options:

A.

CookieMode

B.

CookieDomain

C.

FormsCookieName

D.

FormsCookiePath

Question 16

George works as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. George creates an application using the .NET Framework. He writes the following code snippet in the application:

public class FirstClass

{

public static int test=500;

}

public class SecondClass : FirstClass

{

public static void Main(String[] args)

{

SecondClass mb=new SecondClass();

mb.MyMethod();

}

public void MyMethod()

{

//Appropriate statement

}

}

George wants to modify the value of the test variable in MyMethod to 1000. Which of the following code segments will he place in MyMethod to accomplish this task?

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

Options:

A.

base.test=1000;

B.

test=1000;

C.

FirstClass.test=1000;

D.

test=1000.00;

Question 17

Robert works as a Software Developer for InfoTech Inc. He develops an application named MyApp that uses SQL Server database and three database components. He wants to ensure that other developed applications cannot use these database components. Users should be authorized before they can access these components. Robert configures the database component assemblies to accomplish this task. Choose the correct actions that Robert should take after the configuration.

Options:

A.

True

B.

False

Question 18

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

Options:

A.

Use the ThreadPool.UnsafeQueueUserWorkItem method.

B.

thread2 raises its own priority

C.

Use the Thread.Start method.

D.

Use the Thread.Resume method.

E.

Use the ThreadPool.QueueUserWorkItem method.

Question 19

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.

Cryptosystem

B.

Cryptanalyst

C.

Cryptographic toolkit

D.

Cryptographer

Question 20

Sam works as a Software Developer for GenTech Inc. He creates a .NET remote object, named Object1. Object1 holds a Hashtable object, or the name and value pairs. Seven client applications use Object1 to get and set property values. Sam wants to ensure that the properties set by one of the client applications can be accessed by all the applications using Object1. Choose the appropriate actions he will take to accomplish this.

Question # 20

Options:

A.

Question 21

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

LambdaExpression

C.

Expression

D.

Expression (TDelegate)

Question 22

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 23

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 24

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.

Method

C.

Function

D.

Property

Question 25

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating an ASP.NET Web application using the .NET Framework. The application will allow users to post and reply to messages after logging. You create the authentication mechanisms for the application. You use SQL Server 2005 and the Active Directory service interchangeably for authentication. You are required to provide a method for users of the application to register. You also want to ensure that the application utilizes multiple authentication methods when users register. What will you do?

Options:

A.

Create a form that contains a CreateUserWizard control and configure custom membership providers.

B.

Create a form that contains a CreateUserWizard control and configure Membership provider s.

C.

Create a Web custom component and Configure Membership Providers.

D.

Create a Web custom component that offers a new user registration form and stores the outcome in XML that matches a defined schema.

Question 26

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 27

You work as a Software Developer for Mansoft Inc. The company uses Visual Studio .NET as its application development platform. You create an application named ExceptionHandling using .NET Framework. You write code and execute it, but it causes an error. Now, you want to find out where the exception has occurred.

Which of the following properties of the exception class will you use to accomplish the task?

Options:

A.

Source

B.

Message

C.

Data

D.

StackTrace

Question 28

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 29

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 30

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.

CodeAccessPermission.RevertDeny();

B.

permission.Demand();

C.

permission.Deny();

D.

permission.PermitOnly();

E.

CodeAccessPermission.RevertAssert();

Question 31

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 application using .NET Framework 2.0. The application will be used by all the branches of the company. You sometimes require a variable number of arguments to be passed to a method. For example, you may require a sum method, which calculates the total of the numbers passed to it no matter how many numbers are passed. What will you do to accomplish the task?

Options:

A.

Use the base keyword.

B.

Use the ref keyword.

C.

Use the params keyword.

D.

Use the out keyword.

E.

Use the volatile keyword.

Question 32

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You create a remoting application that provides stock information to customers using .NET Framework. The server component raises an event on the client computer when certain conditions are met. You must ensure that the server raises exactly one event for each client application that is registered for the event. What will you do to accomplish this task?

Options:

A.

Configure the server class as a SingleCall Activated Object (SAO) and check for duplicate client delegate methods before raising the event.

B.

Configure the server class as a Singleton Activated Object (SAO) and check for duplicate client delegate methods before raising the event.

C.

Configure the server class as a Client Activated Object (CAO) and override the CreateObjRef method to check for duplicate client delegate methods before raising the event.

D.

Configure the server class as a Client Activated Object (CAO) and check for duplicate client delegate methods before raising the event.

Question 33

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. The application is used to map HTTP requests to HTTP handlers based on a file name extension. You need to ensure that each HTTP handler processes individual HTTP URLs or groups of URL extensions in the application. Which of the following built-in HTTP handlers will you use to accomplish this task?

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

Options:

A.

Web service handler (*.asmx)

B.

Generic handler (*.ashx)

C.

Generic Web handler (*.ashx)

D.

ASP.NET page handler (*.aspx)

E.

Trace handler (trace.axd)

Question 34

You work as a Software Developer for ABC Inc. The Company uses the .NET Framework as its application development platform. You have created a class to represent a stop light. The stop light can be red, green, or blue. Which of the following elements would you use to simplify how developers defined the value?

Options:

A.

Structure

B.

Delegate

C.

Enumeration

D.

Interface

Question 35

You work as a Software Developer for Mansoft Inc. You create an application and use it to create code access security policies. Which of the following tools will you use to examine and modify code access security policies from a batch file?

Options:

A.

GacUtil.exe

B.

StoreAdm.exe

C.

Caspol.exe

D.

Tlbimp.exe

E.

Sn.exe

Question 36

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 to represent the code expression as objects in the form of expression trees. You want to initialize the members of a newly created object. What will you do to accomplish the task?

Options:

A.

Use the MemberBinding class

B.

Use the UnaryExpression class

C.

Use the MemberBindingType enumeration

D.

Use the MemberListBinding class

Question 37

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 38

Sam works as a Software Developer for GenTech Inc. He deploys an ASP.NET application on a server. When an error occurs, users are redirected to a custom error page that is specified in the Web.config file. Users report that a particular page repeatedly generates errors. Sam wants to gather detailed information about the error on this page. He also wants to ensure that users continue to be redirected to the custom error page, if the requested pages generate errors. What will Sam do to accomplish this?

Options:

A.

In the Web.config file, set the mode attribute of the customErrors element to RemoteOnly.

Access the page from a browser on the server.

B.

Modify the Web.config file to include the following element:

Access the application from a browser on a client computer.

C.

In the Web.config file, set the mode attribute of the customErrors element to RemoteOnly.

Access the page from a browser on a client computer.

D.

Modify the @ Page directive so that the Trace and the LocalOnly attributes are set to true.

Access the page from a browser on the server.

Question 39

Allen works as a Software Developer for Mansoft Inc. He creates a Console application. He writes the following line of code in the application:

String str="ABC's World";

According to the given line of code, which of the following are legal statements?

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

Options:

A.

String st1="Hello" + str;

B.

int j=str.Length;

C.

str[2]="y";

D.

str=str+10;

E.

str=5;

Question 40

You work as a Software Developer for ManSoft Inc. The company uses Visual Studio.NET 2005 as its application development platform. The company wants you to develop an application that manages the account information of the company. The requirement of the application is to use only value types. Which of the following types will you use to accomplish the task?

Each correct answer represents a complete solution. Choose three.

Options:

A.

User-defined Types

B.

Interfaces

C.

Built-in Types

D.

Enumerations

Question 41

John works as a Web Developer for CyberNet Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. The application will be used for online-shopping. He deploys the application on the company's Web server. The application receives millions of hits daily. In order to improve the performance of the application, John decides to use the in-process state management feature of ASP.NET for storing the session state information. Which of the following attributes will John use in the <sessionState> element of the application's Web.config file to accomplish the task?

Options:

A.

mode="InProcess"

B.

sessionMode="InProc"

C.

sessionMode="InProcess"

D.

mode="InProc"

Question 42

Maria works as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. She creates a Web service and uses a Session object in it. She declares a variable in the Session object. What will be the scope of the variable?

Options:

A.

The variable will be available as long as a user interacts with it.

B.

The variable will be available forever.

C.

The variable will be available even after the session becomes inactive.

D.

The variable will be available as long as the session is active.

Question 43

You work as a Software Developer for ABC Inc. You create a Web service application named MyWebService using Visual Studio .NET 2005. You use the MyWebService to create a SOAP message. You are not sure whether or not the SOAP message format is correct. Therefore, you decide to use the AsynchronousOperationException class. This class is used to throw an exception when the format of a SOAP message is invalid. 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 MyException : AsynchronousOperationException

{

//Code here

}

B.

public class AsynchronousOperationException : AsynchronousOperationException

{

//Code here

}

C.

public class AsynchronousOperationException : Exception

{

//Code here

}

D.

public class MyException : Exception

{

//Code here

}

Question 44

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 45

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

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 48

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 received a file in ASCII encoded from one of the company's branch. Therefore, you are required to decode the file encoded in ACSII. Which of the following decoding types will you use to get the correct results?

Each correct answer represents a complete solution. Choose two.

Options:

A.

UTF-32

B.

UTF-16

C.

UTF-7

D.

UTF-8

Question 49

You work as a Software Developer for Mansoft Inc. The company uses Visual Studio.NET as its application development platform. You create an ASP.NET Web application using the .NET Framework. You want to authenticate the application and then deploy it on a server running

Microsoft Windows Server 2003 Standard Edition hosting Microsoft Internet Information Services 6.0. Which of the following authentication methods will you use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Integrated Windows

B.

Extensible Authentication Protocol

C.

Windows NT

D.

Anonymous

E.

Basic

Question 50

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 an ASP.NET application by using the .NET Framework 3.5. You need to implement a means to monitor Service Level Agreement (SLA) compliance in the application. You are required to identify a method to enable perfect calculation of the time that all requests take to process.

What will you do?

Options:

A.

Create and register a custom HttpModule.

B.

Use the IRequiresSessionState interface.

C.

Use the WebHttpBinding class.

D.

Create and register a custom HttpHandler.

Question 51

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are deploying a class library using the .NET Framework. Portions of your code need to access system environment variables. You need to force a runtime security exception only when the callers that are higher in the call stack do not have necessary permissions to access the resources. Which of the following methods will you use to accomplish the task?

Options:

A.

PermitOnly()

B.

Demand()

C.

Assert()

D.

Deny()

Question 52

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 53

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 54

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 application that generates summary reports. These reports will be viewed by all the chief executives in the Korean branch. Therefore, you need to ensure that the summary reports must contain Korean characters. Which of the following encoding types will you use to accomplish the task?

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

Options:

A.

UTF-8

B.

UTF-32

C.

Unicode

D.

ASCIIEncoding

E.

UTF-16

Question 55

Allen works as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. He develops an application that manipulates files containing confidential information. He wants to make a copy of the existing file, named

ConfidentInfo1 to a new file, named ConfidentInfo2 in the local drive by using an instance method. However, Allen wants to ensure that the existing file does not overwrite the new file.

Which of the following classes' instance method will Allen consider in the application to accomplish the task?

Options:

A.

StringWriter class

B.

FileInfo class

C.

BinaryWriter class

D.

DirectoryInfo class

Question 56

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 hash data with the Secure Hash Algorithm (SHA) using .NET Framework. The hash data is passed to the method as a byte array named msg. You are required to calculate the hash of the msg array by using the SHA1. It is also mandatory to place the result into a byte array named Myhash. Which of the following code segments should you use to accomplish the task?

Options:

A.

SHA1 Mysha1 = new SHA1CryptoServiceProvider();

Mysha1.GetHashCode();

byte[] Myhash = Mysha1.Hash;

B.

SHA1 Mysha1 = new SHA1CryptoServiceProvider();

byte[] Myhash = null;

Mysha1.TransformBlock(msg, 0, msg.Length, Myhash, 0);

C.

SHA1 Mysha1 = new SHA1CryptoServiceProvider();

byte[] Myhash = BitConverter.GetBytes(Mysha1.GetHashCode());

D.

SHA1 Mysha1 = new SHA1CryptoServiceProvider();

byte[] Myhash = Mysha1.ComputeHash(msg);

Question 57

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 58

Which of the following modifiers in C# will you use if you do NOT want a custom-build component to be a base class?

Options:

A.

sealed

B.

virtual

C.

override

D.

static

Question 59

Which of the following is a restriction operator in LINQ?

Options:

A.

GROUPBY

B.

WHERE

C.

THENBY

D.

SELECTMANY

Question 60

Which of the following classes will you use to specify that a string must be centered when drawn?

Options:

A.

StringAlignment

B.

StingFormat

C.

String

D.

LineAlignment

Question 61

You work as a Software Developer for ManSoft Inc. You use C# .NET to create an assembly named TestAssembly that will be used by other applications, including a standard COM client application. You must deploy the assembly on the COM application to a client computer. You must ensure that the COM applications can instantiate components within the assembly as COM components. Which of the following options will you use to accomplish this task?

Options:

A.

Generate a registry file for the assembly by using the Assembly Registration Tool (Regasm.exe) and register the file on the client computer.

B.

Deploy the assembly to the global assembly cache on the client computer.

Add a reference to the assembly in the COM client application.

C.

Create a strong name of the assembly by using the Strong Name tool(Sn.exe).

D.

Generate a type library for the assembly by using the Type Library Importer (Tlbimp.exe) and register the file on the client computer.

Question 62

Henry works as a Software Developer for SoftTech Inc. He creates a Windows form named

MyForm1. The form contains detailed information about a student. The form uses a ListBox control named ListBox1 that concatenates two strings displayed in two TextBox controls. Henry wants a method to return a value for the control. Which of the following options will he consider while creating a method for the control?

Options:

A.

A method with a string return type.

B.

A void method that passes only one parameter.

C.

A method with an integer return type.

D.

A void method that passes more than one parameter.

Question 63

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 64

You work as a Software Developer for ABC Inc. You create an ASP.NET Web application named MyWebApplication. You want to provide secure access to company's customers. You want to enable users to access the site from any browser by providing their user name and password. Which of the following authentication methods will you use to accomplish this task?

Options:

A.

Windows NT

B.

Secure Socket Layer

C.

Basic

D.

Single Sign-On

E.

Certificate Server

Question 65

Which of the following session and instancing modes will you set if you require a sessionfull binding and want to create a new instance object for each client request?

Options:

A.

Set SessionMode to Allowed and IntsanceMode to PerSession.

B.

Set SessionMode to Required and IntsanceMode to Single.

C.

Set SessionMode to Required and IntsanceMode to PerCall.

D.

Set SessionMode to Allowed and IntsanceMode to PerCall.

Question 66

You work as a Software Developer for HiTech Inc. You develop a Web application named

MyWebApp. The application contains several Web pages that display a registration form for a user. You want to perform user input data validation at the server-side, so that you can disable the client-side data input validation. Which of the following actions will you take to accomplish the task?

Options:

A.

Set the CausesValidation property of a server control to false.

B.

Set the Enabled property of a validation control to true.

C.

Set the Enabled property of a validation control to false.

D.

Set the EnableClientScript property of a validation control to true.

E.

Set the EnableClientScript property of a validation control to false.

Question 67

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 a Windows application using .NET Framework. Users report that the application is not running properly. When the users try to complete a particular action, the following error message comes out:

Unable to find assembly 'myservices, Version=1.0.0.0, Culture=neutral,

PublicKeyToken=29b5ad26c9de9b95'.

You notice that the error occurs as soon as the application tries to call functionality in a serviced component that was registered by using the following command:

regsvcs.exe myservices.dll

You must make sure that the application can call the functionality in the serviced component with no exceptions being thrown. What will you do to accomplish this task?

Options:

A.

Run the command line tool: regasm.exe myservices.dll.

B.

Copy the serviced component assembly into the C:\Program Files\ComPlus Applications fold er.

C.

Run the command line tool: gacutil.exe /i myservices.dll.

D.

Copy the serviced component assembly into the C:\WINDOWS\system32\Com folder.

Question 68

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 69

David works as a Software Developer for McRobert Inc. He develops a Web application named App1 using Visual Studio .NET. App1 contains several Web forms that display information about an online shopping process. David wants to provide a Web-based shopping catalog to users. However, he wants to ensure that the information about the shopping catalog is secure and requires no server resources.

What will David do to accomplish the task?

Options:

A.

Use a query string as a user preference.

B.

Use a session state variable as a user preference.

C.

Use an application state variable as a user preference.

D.

Use a session cookie as a user preference.

Question 70

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 71

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 72

Maria works as a Software Developer for BlueWell Inc. She develops an application, named App1, using Visual C# .NET. The application displays employee details from a SQL Server database. Maria wants to use a string array, named MyArray, in the application code to store employee names. Which of the following statements will she use to declare MyArray?

Options:

A.

Option Base 1 string[] MyArray = new string[9];

B.

string[] MyArray = new string[9];

C.

Option Base 0 string[] MyArray = new string[9];

D.

string[] MyArray = new string[0 to 9];

E.

string MyArray[9] = new string;

Page: 1 / 49
Total 491 questions