Easter Sale Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

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

GIAC GIAC Secure Software Programmer - C#.NET

Last Update May 18, 2024
Total Questions : 491

We are offering FREE GSSP-NET-CSHARP GIAC exam questions. All you do is to just go and sign up. Give your details, prepare GSSP-NET-CSHARP free exam questions and then go for complete pool of GIAC GIAC Secure Software Programmer - C#.NET test questions that will help you more.

GSSP-NET-CSHARP pdf

GSSP-NET-CSHARP PDF

$35  $99.99
GSSP-NET-CSHARP Engine

GSSP-NET-CSHARP Testing Engine

$42  $119.99
GSSP-NET-CSHARP PDF + Engine

GSSP-NET-CSHARP PDF + Testing Engine

$56  $159.99
Questions 1

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You need to write a code segment that transfers the contents of a byte array named ToSend by using a NetworkStream object named NetStr. You want to use a cache of size only 8,192 bytes. Which of the following code segments will you use to accomplish the task?

Options:

A.  

MemoryStream MStream = new MemoryStream(8192); NetStr.Write(ToSend, 0, (int) MStream.Length);

B.  

BufferedStream BStream = new BufferedStream(NetStr); BStream.Write(ToSend, 0, 8192);

C.  

BufferedStream BStream = new BufferedStream(NetStr, 8192); BStream.Write(ToSend, 0, ToSend.Length);

D.  

MemoryStream MStream = new MemoryStream(8192); MStream.Write(ToSend, 0, (int) NetStr.Length);

Discussion 0
Questions 2

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

Discussion 0
Questions 3

Holmes works as a Programmer for HiTech Institute. He develops an ASP.NET application named LibraryRecord by using Visual Studio .NET. The LibraryRecord application uses a SQL Server database named Database1. Database1 contains two tables: Students and Books. The Students table comprises three columns: StudentID, StudentName, and BookID. The Books table comprises two columns: BooksID and BooksName. Holmes creates a stored procedure that returns the records of all students who borrowed books from the institute. What will Holmes do to retrieve the records of the issued books most efficiently?

Options:

A.  

Use the INNER JOIN keyword in his query.

B.  

Use the INNER JOIN keyword more than once in his query.

C.  

Use the LEFT OUTER JOIN keyword in his query.

D.  

Use the WHERE clause in his query.

Discussion 0
Questions 4

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. The company uses Microsoft Windows authentication. All users are in the TESTPRO1 domain. John wants to ensure that all users except Mark, Roger, and David are allowed to access the application. Which of the following code will he use in the application's Web.config file to accomplish the task?

Options:

A.  

B.  

C.  

D.  

Discussion 0
Questions 5

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

Options:

A.  

1. Export a type library for your managed code

B.  

1. Import a type library as an assembly

2. Create instances of COM object

C.  

1. Register your assembly by using COM

2. Reference your managed code from COM

D.  

1. Create a class to hold DLL methods

2. Create prototype methods with managed code

Discussion 0
Questions 6

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows application using the .NET Framework. You create a database to maintain the record of the students. You create a table named Student. You want to retrieve names and roll number of those students whose age is less than ten years. An instance of the SqlCommand class named StudentCommand is already created. Which of the following code segments should you use to execute the query?

Options:

A.  

StudentCommand.CommandType = CommandType.StoredProcedure;

StudentCommand.CommandText = "SELECT Name, Roll number FROM Student WHERE Age <

10";

B.  

StudentCommand.CommandType = CommandType.StoredProcedure;

StudentCommand.CommandText = "Name and Roll number of students less than ten years";

C.  

StudentCommand.CommandType = CommandType.Text;

StudentCommand.CommandText = "SELECT Name, Roll number FROM Student WHERE Age <

10";

D.  

StudentCommand.CommandText = CommandText.Text;

StudentCommand.CommandType = "SELECT Name, Roll number FROM Student WHERE Age <

10";

Discussion 0
Questions 7

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 uses a SQL Server 2008 database on the network.

You use ADO.NET Data Services that exposes data as resources that are addressable by URIs. You access and change data by using the semantics of representational state transfer (REST), specifically the standard HTTP verbs of GET, PUT, POST, and DELETE. You must ensure that when a service violates any other constraint, the service cannot strictly be referred to as RESTful. What will you do?

Options:

A.  

Use the layered system constraint.

B.  

Use the code on demand constraint.

C.  

Use the client-server constraint.

D.  

Use the stateless constraint.

E.  

Use the cacheable constraint.

Discussion 0
Questions 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 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.

Discussion 0
Questions 9

Maria works as a Software Developer for ABC Inc. She develops a Console application using Visual Studio .NET 2005. She writes the following code in the application:

String st="Hello World";

int MyBegin=1;

int MyEnd=3;

Console.WriteLine(st.Substring(MyBegin, MyEnd));

What will happen when she tries to compile and execute the application?

Options:

A.  

The application will compile successfully and display "el" as the output.

B.  

The application will compile successfully and display "ell" as the output.

C.  

A compile-time error will occur stating "No method matching substring(int, char) exists".

D.  

The application will compile successfully and display "Hel" as the output.

Discussion 0
Questions 10

Allen works as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. Allen creates an application that will be used to handle security information related to the company. He wants to secure the application by using the most secure authentication method. The method should have a strong key for encryption and send the encrypted password across the network. Which of the following authentication methods will Allen use to accomplish the task?

Options:

A.  

Integrated Windows authentication

B.  

Basic authentication

C.  

Certificate-based authentication

D.  

Digest authentication

Discussion 0
Questions 11

Smith works as a Software Developer for ABC Inc. He creates an application using Visual

Studio .NET 2005. The application displays "Welcome to ABC" on the top-left corner of a form. He writes the following code:

StringBuilder strbuild1 = new StringBuilder(20);

strbuild1.Append("'Welcome");

strbuild1.Append(" ");

strbuild1.Append("to");

strbuild1.Append(" ");

strbuild1.Append("ABC'");

string str1 = strbuild1.ToString();

Console.WriteLine(str1);

Console.ReadLine();

What is the main purpose of using StringBuilder object in the application?

Options:

A.  

To append a specified string to the end of the StringBuilder object.

B.  

To concatenate two or more different set of strings or a set of Unicode characters.

C.  

To create dynamic or mutable strings.

D.  

To convert a value of the StringBuilder object to the String object.

Discussion 0
Questions 12

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

l Root Web

l Web application root directory

l Web site

l Web application subdirectory

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

Options:

A.  

Manhine.config

B.  

Proxy auto-config

C.  

ApplicationName.config

D.  

Web.config

Discussion 0
Questions 13

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

Options:

A.  

protected int x;

protected void fun(){x=5;}

B.  

int x;

public void fun(){x=5;}

C.  

public int x;

public void fun() {x=5;}

D.  

private int x;

public void fun(){x=5;}

E.  

private int x;

private void fun(){x=5;}

Discussion 0
Questions 14

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. 91. The application uses ASP.NET AJAX, and you need to deploy it in a Web farm environment. You are required to configure SessionState for the application. Which of the following code segments will you use to accomplish this task?

Options:

A.  

B.  

C.  

D.  

Discussion 0
Questions 15

Peter works as a Software Developer for PatSoluTech Inc. He develops a Web application using Visual Studio .NET. The application contains an online ordering Web form named WebForm1. WebForm1 contains several Web server controls that include a TextBox control named TextBox1 and an ImageButton control named ImageButton1. He wants data entered in TextBox1 to be validated whenever ImageButton1 is clicked. Which of the following will Peter use to accomplish the task?

Options:

A.  

ImageButton1.CausesValidation

B.  

ImageButton1.OnClientClick

C.  

ImageButton1.ValidationGroup

D.  

ImageButton1.Enabled

Discussion 0
Questions 16

You work as a Software Developer for Mansoft Inc. You create an ASP.NET Web application named MyWebApp. You implement a security protocol to transmit secured data between a client and a server. You try to authenticate the client computer. However, you are unable to do so, and the AuthenticationException exception is thrown. Which of the following classes will you use to accomplish this task?

Each correct answer represents a complete solution. Choose two.

Options:

A.  

NegotiateStream

B.  

SslStream

C.  

Stream

D.  

AuthenticatedStream

Discussion 0
Questions 17

You can use LINQ in an ASP.NET application through the LinqDataSource control, the __________ control, or by creating LINQ queries.

Options:

A.  

ADO.NET DataSet

B.  

ObjectDataSource

C.  

SqlDataSource

D.  

XmlDataSource

Discussion 0
Questions 18

You work as a Software Developer for ABC Inc. You create a Console application. You write the following code in the application:

RC2CryptoServiceProvider TestRC2 = new RC2CryptoServiceProvider();

Console.WriteLine(TestRC2.Mode);

What output will the above code display?

Options:

A.  

Cipher Block Chaining (CBC)

B.  

Output Feedback (OFB)

C.  

Cipher Text Stealing (CTS)

D.  

Electronic Codebook (ECB)

E.  

Cipher Feedback (CFB)

Discussion 0
Questions 19

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.

Discussion 0
Questions 20

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

Options:

A.  

[SecurityPermissionSecurityAction.LinkDemand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

B.  

[SecurityPermission(SecurityAction.Deny,

Flags = SecurityPermissionFlag.UnmanagedCode)]

C.  

[SecurityPermission(SecurityAction.Demand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

D.  

[SecurityPermission(SecurityAction.Assert,

Flags = SecurityPermissionFlag.UnmanagedCode)]

Discussion 0
Questions 21

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You need to write a code segment that transfers the contents of a byte array named ToSend by using a NetworkStream object named NetStr. You want to use a cache of size only 8,192 bytes. Which of the following code segments will you use to accomplish the task?

Options:

A.  

MemoryStream MStream = new MemoryStream(8192);

NetStr.Write(ToSend, 0, (int) MStream.Length);

B.  

BufferedStream BStream = new BufferedStream(NetStr);

BStream.Write(ToSend, 0, 8192);

C.  

BufferedStream BStream = new BufferedStream(NetStr, 8192);

BStream.Write(ToSend, 0, ToSend.Length);

D.  

MemoryStream MStream = new MemoryStream(8192);

MStream.Write(ToSend, 0, (int) NetStr.Length);

Discussion 0
Questions 22

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

Options:

A.  

SslStream.IsServer

B.  

SslStream.IsMutuallyAuthenticated

C.  

SslStream.IsAuthenticated

D.  

SslStream.IsSigned

E.  

SslStream.IsEncrypted

Discussion 0
Questions 23

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. The application stores sensitive profile data in a SQL Server 2008 database. You are required to make sure that no profile data is stored in clear text. What will you do to accomplish the task?

Options:

A.  

Use the Aspnet_regiis.exe tool to encrypt the connection string that is used to connect to the database.

B.  

Create a custom profile provider and ensure that the provided information is encrypted before it is stored in the database.

C.  

Enable the secure sockets layer encryption for the SQL Server connections.

D.  

Use SQL Profiler.

Discussion 0
Questions 24

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.

Discussion 0
Questions 25

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

Discussion 0
Questions 26

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

Discussion 0
Questions 27

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.  

Discussion 0
Questions 28

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

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

Options:

A.  

Remove Forms authentication and create an ASP.NET membership.

B.  

Change the membership provider to ActiveDirectoryMembershipProvider.

C.  

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

D.  

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

Discussion 0
Questions 29

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

Discussion 0
Questions 30

Sophia works as a Software Developer for BlueWell Inc. She creates a component, named MyComp, using Visual Studio .NET. MyComp includes a method named MyMethod1, which is used to process user requests. MyMethod1 calls a private method, named MyMethod2. Sophia wants to ensure that if an error occurs during the execution, the exceptions encountered by MyMethod2 are caught and passed on to MyMethod1 for exception handling. Which of the following combinations of the exception handler should she use to accomplish the task?

Options:

A.  

try, catch, and throw

B.  

catch, finally, and throw

C.  

try, catch, and finally

D.  

try and throw

Discussion 0
Questions 31

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

Discussion 0
Questions 32

Sam works as a Software Developer for SamTech Inc. He develops a Windows-based application, named App1, using Visual Studio .NET. He wants to set a security policy for the application. To accomplish the task he uses the PolicyLevel class. He wants to set the current policy level to the default state. Which of the following methods will he use to accomplish the task?

Options:

A.  

Resolve

B.  

ChangedNamePermissionSet

C.  

Reset

D.  

Recover

Discussion 0
Questions 33

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are in process of creating an application using the .NET Framework 2.0. The application must collect data from different streams by performing the following operations:

l Reading data from the byte stream

l Reading data from the memory stream

l Reading data from the file stream

Which of the following stream classes will you use to accomplish the task?

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

Options:

A.  

MemoryStream

B.  

StreamWriter

C.  

FileStream

D.  

StreamReader

Discussion 0
Questions 34

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You create an application named MyApplication. MyApplication uses the System.IO namespace. You want to ensure that you are able to use a class that specifies read and write operations either in synchronous or asynchronous manner. Which of the following classes will you use to accomplish the task?

Options:

A.  

StreamReader

B.  

FileStream

C.  

StreamWriter

D.  

MemoryStream

Discussion 0
Questions 35

You work as an Application Developer for ABC Inc. You are assigned with developing a Web site that will handle information related to monthly sales of the company. You wish to secure the Web site so that only employees of the Accounts department can view the Web pages. You need to create roles for the employees of this department. The user account information will be stored in a SQL Server database named Database. You decide to do all this by using the Web Site Administration Tool. Which of the following types of security will you use to accomplish the task?

Options:

A.  

Basic authentication

B.  

Integrated Microsoft Windows authentication

C.  

Forms-based authentication

D.  

Digest authentication

Discussion 0
Questions 36

You work as a Windows Application Developer for ABC Inc. The company uses Visual

Studio .NET 2008 as its application development platform. You create a Windows Forms

application using .NET Framework 3.5. You create multiple threads in the application and the

threads will execute the same method. You want to synchronize access to a block of code within the method; thus, no two threads execute the block at the same time. What will you do to accomplish this?

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

Options:

A.  

Add a SynchronizationAttribute attribute to the method that the multiple threads will call.

B.  

Call the Interlocked.Increment method before the block of code that needs to be synchroni zed.

C.  

Call the Monitor.Enter method before the block of code that needs to be synchronized.

D.  

Call the Interlocked.Decrement method after the block of code that needs to be synchroniz ed.

E.  

Add a Semaphore object to the method that the multiple threads will call.

F.  

Call the Monitor.Exit method after the block of code that needs to be synchronized.

Discussion 0
Questions 37

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

Options:

A.  

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

B.  

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

C.  

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

D.  

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

Discussion 0
Questions 38

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 write the following code in the application:

string tree = "ABC";

System.Reflection.MethodInfo addMethod = typeof(Dictionary).GetMethod("Add");

You need to create an ElementInit that represents calling Dictionary.Add(tree.Length, tree). Drag and drop the appropriate values to accomplish the task.

Options:

A.  

Discussion 0
Questions 39

Sam works as a Software Developer for BlueWell Inc. He develops two applications: MyApp1 and MyApp2 using Visual Studio .NET 2005. He wants to ensure that both these applications use the same assembly named Assembly1. Therefore, he signs Assembly1 with a strong name for each application. What is significant about the strong name that consists of the assembly's identity?

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

Options:

A.  

A strong name assures the uniqueness of a name.

B.  

A strong name protects the root version of an assembly.

C.  

A strong name provides a strong integrity check.

D.  

A strong name creates different versions of an assembly.

Discussion 0
Questions 40

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. The application uses the Forms authentication mode. Each folder in the application contains confidential Microsoft Excel files. You are required to make sure that bots are not allowed to access the folders in the application. What will you do?

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

Options:

A.  

Add a element to the element in the Web.config file.

B.  

Set the authorization mode of the traceElements attribute value in the Web.config file.

C.  

Add a element to the element in the Web.config file.

D.  

Map the Excel files to the ASP.NET ISAPI filter.

E.  

Implement a Completely Automated Public Turing Tests to Tell Computers and Humans Apart (CAPTCHA) image control on each page of the application.

Discussion 0
Questions 41

You work as a Software Developer for SunSoft Inc. The company uses Visual Studio .NET 2005 as its application development platform. You use .NET Framework 2.0 to create several Windows applications. All applications use a common class library assembly named Customers. You deploy the application to the client computers on your company's intranet. Later, you modify the assembly. Any application that uses version 1.0.0.0 must now use version 2.0.0.0. Which of the following options will you use to accomplish the task?

Options:

A.  

Modify the Publisher Policy file containing a reference to Customers.

B.  

Modify the application configuration file for Customers.

C.  

Modify the reference path for Customers.

D.  

Modify the machine configuration file on your client computers.

Discussion 0
Questions 42

Hannah works as a Programmer in a college of Information Technology. The company uses Visual Studio .NET as its application development platform. The Dean of the college wants to obtain the performance report of each student. Hannah develops an application named StudentPerformanceReport by using Visual C# .NET. This application uses a SQL Server database named Database1 and a stored procedure named PROC1. PROC1 executes a query that returns the internal assessment result of each student. Hannah uses a TextBox control named AssessmentText in the application form named MyForm. She wants to display the total test result of each student in the AssessmentText text box control. StudentPerformanceReport uses a SqlCommand object to run PROC1. Hannah wants to write code to call PROC1. PROC1 contains an output parameter and displays its value as "@AssessmentResult" in text format. Which of the following code segments can Hannah use to accomplish this task?

Each correct answer represents a complete solution. Choose two.

Options:

A.  

AssessmentText.Text = (string)comm.Parameters["@AssessmentResult"].Value;

B.  

AssessmentText.Text = comm.Parameters["@AssessmentResult"].SourceColumn;

C.  

AssessmentText.Text = comm.Parameters["@AssessmentResult"].ToString();

D.  

AssessmentText.Text = comm.Parameters["@AssessmentResult"].Value.ToString();

Discussion 0
Questions 43

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.

Discussion 0
Questions 44

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.

Discussion 0
Questions 45

Martin works as a Software Developer for BlueWell Inc. He creates an ASP.NET application, named App1. During beta testing of App1, he ensures that the actual ASP.NET error messages are displayed whenever errors are encountered. He also ensures that both developers and beta testers see the actual text of the error messages.

During beta testing of App1, Martin performs beta testing of other applications also on the same test server. All the other applications display the ASP.NET error messages. After completing beta testing, Martin promotes the beta test server to a production server. He wants all the applications to display a single, user-friendly error message. Martin also wants to configure App1 and the production server to meet these goals. He removes the customErrors element from the Web.config file for App1. What else will he do to accomplish the required task with minimum administrative effort?

Options:

A.  

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

B.  

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

C.  

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

D.  

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

E.  

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

F.  

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

Discussion 0
Questions 46

You work as a Software Developer for Mansoft Inc. You create an application using Visual Studio .NET 2005. You write code in the application and execute it, but it caused an error. Now, you want to find out the reason that has thrown the exception. Which of the following properties will you use to accomplish this task?

Options:

A.  

Message

B.  

TraceSwitch

C.  

Data

D.  

Source

E.  

StackTrace

Discussion 0
Questions 47

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)

Discussion 0
Questions 48

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Web application using .NET Framework 2.0. The application code restricts access to some pages based on the users' credentials. However, you are required to configure IIS to supply the user's Windows credentials to the Web application. All these credentials must be encrypted. What will you do?

Options:

A.  

Disable Anonymous access and enable Basic authentication.

B.  

Enable Anonymous access and enable Windows authentication provider.

C.  

Enable Anonymous access and enable Basic authentication.

D.  

Disable Anonymous access and enable Integrated Windows authentication.

Discussion 0
Questions 49

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

Options:

A.  

Basic authentication

B.  

Anonymous authentication

C.  

Digest authentication

D.  

Integrated Windows authentication

Discussion 0
Questions 50

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 write the following code snippet to call a method from the Win32 API by using PInvoke:

int rst = MessageBox(hWd, Mytext, Mycaption, Mytype);

You are required define a method prototype. Which of the following code segments will you use to accomplish this task?

Options:

A.  

[DllImport("user32")] extern int MessageBoxA(int hWd, String Mytext, String Mycaption, uint Mytype);

B.  

[DllImport("user32")] extern int Win32API_User32_MessageBox(Int hWd, String Mytext, String Mycaption, uint Mytype);

C.  

[DllImport("user32")] extern int MessageBox(int hWd, String Mytext, String Mycaption, uint Mytype);

D.  

[DllImport("C:\\WINDOWS\\system32\\user32.dll")] extern int MessageBox(int hWd, String Mytext, String Mycaption, uint Mytype);

Discussion 0
Questions 51

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();

Discussion 0
Questions 52

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();

Discussion 0
Questions 53

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

Discussion 0
Questions 54

Which of the following techniques is used to transmit passwords during authentication?

Options:

A.  

Asymmetric encryption

B.  

Hashing

C.  

Salted Hash

D.  

Symmetric encryption

Discussion 0
Questions 55

Which of the following is the best encryption algorithm to encrypt and decrypt messages?

Options:

A.  

AES

B.  

TripleDES

C.  

DES

D.  

RSA

Discussion 0
Questions 56

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

Options:

A.  

Set the CausesValidation property of the bCancel button to false.

B.  

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

C.  

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

D.  

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

Discussion 0
Questions 57

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

Discussion 0
Questions 58

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.

Discussion 0
Questions 59

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;

Discussion 0
Questions 60

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

Options:

A.  

PPP

B.  

FTP

C.  

PGP

D.  

PPTP

Discussion 0
Questions 61

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

Options:

A.  

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

B.  

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

C.  

A background thread belongs to the managed thread pool.

D.  

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

Discussion 0
Questions 62

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

Each correct answer represents a complete solution. Choose two.

Options:

A.  

UrlMembershipCondition

B.  

ApplicationDirectoryMembershipCondition

C.  

GacMembershipCondition

D.  

SiteMembershipCondition

Discussion 0
Questions 63

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You are creating a Windows Forms application using .NET Framework 3.5. You need to develop a new control for the application. You must ensure that the control inherits the TreeView control by adding a custom node tag and a highlight color. What will you do?

Options:

A.  

Set the control's DrawMode property to OwnerDrawText, and then implement a custom DrawNode event handler.

B.  

Set the control's DrawMode property to OwnerDrawAll, and then implement a custom DrawNode event handler.

C.  

Write a code segment in the DrawNode event handler to give the highlight color.

D.  

Override the OnPaint method.

Discussion 0
Questions 64

Which of the following attributes of the customErrors element is used to specify whether custom errors are enabled, disabled, or shown only to remote clients?

Options:

A.  

Off

B.  

Mode

C.  

On

D.  

RemoteOnly

Discussion 0
Questions 65

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

Discussion 0
Questions 66

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 using the .NET Framework 2.0.

You are required to use a datatype that will store only numbers ranging from -32,768 to 32,767.

Which of the following datatypes will you use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

Options:

A.  

int

B.  

string

C.  

short

D.  

System.Int16

Discussion 0
Questions 67

Allen works as a Software Developer for Mansoft Inc. He creates an ASP.NET Web application named MyApplication. He wants to use the Health Monitor to monitor MyApplication to record details about events rather than just the values of specific data counters. Which of the following health monitoring child elements will he use to accomplish the task?

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

Options:

A.  

Rules

B.  

Profiles

C.  

bufferModes

D.  

customErrors

E.  

eventMappings

F.  

Providers

Discussion 0
Questions 68

Allen works as a Software Developer for Mansoft Inc. He develops a Web application using Visual Studio .NET. He adds a Web reference to an XML Web service named MyWebService in the application. MyWebService includes a method named MyMethod, which takes user identification number as a parameter and returns a DataSet object containing user information. The System.ArgumentException is thrown if the user identification number does not lie between 1 and 500. Allen writes a try and catch block to capture the exception thrown by the Web service. Which of the following exceptions will the try and catch block catch if a user calls MyMethod passing 501 as a parameter?

Options:

A.  

System.Web.Services.Protocols.SoapException

B.  

System.Web.Services.Protocols.SoapHeaderException

C.  

System.ApplicationException

D.  

System.ArgumentNullException

Discussion 0
Questions 69

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. You need to implement a system to monitor Service Level Agreement (SLA) compliance in the application. You are required to make a method to enable precise calculation of the time taken by all requests to process. What will you do to accomplish this?

Options:

A.  

Implement a Timer component in the application. Calculate the elapsed time between the Start and Stop methods.

B.  

Implement a base Web form for all the Web forms in the application. Calculate the elapsed time between the Load and Unload events.

C.  

Create and register a custom HttpHandler.

D.  

Create and register a custom HttpModule.

Discussion 0
Questions 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 the development of an ASP.NET Web application using .NET Framework 3.5. The application must be deployed by using the http://www.ABC.com/ URL. The application has several Web forms.

You need to implement Really Simple Syndication (RSS) feeds functionality. The RSS feeds will be used by the http://www.ABC.com/Updates.rss URL. You must ensure that the application displays the RSS-formatted information when accessing the given URL. What will you do to accomplish this?

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

Options:

A.  

Create and register a custom HttpHandler class that releases the RSS feeds.

B.  

Create a Web form named Updates that releases the RSS feeds.

C.  

Create an ASMX Web service component named Updates.

D.  

Add the HttpHandler class to the .rss extension.

E.  

Create and register a custom HttpModule class.

Discussion 0
Questions 71

You work as a Software Developer for InfoTech Inc. You develop a Windows application named MyWinApp that displays a registration form for users. You want to ensure that whenever a user enters a wrong data in the required TextBox controls, the data will not be accepted by the application. Which of the following actions will you take so that users should enter only valid data?

Options:

A.  

Use a message box that will display an error message with an error icon.

B.  

Use the ErrorProvider component in the application.

C.  

Use the HelpProvider component in the application.

D.  

Use a message box that will display an error message..

Discussion 0
Questions 72

You work as an Enterprise 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 want to notify the users when a print job has finished. Which of the following events will you use to accomplish the task?

Options:

A.  

PrintDocument.PrintPage

B.  

PrintDocument.EndPrint

C.  

PrintDocument.QueryPageSettings

D.  

PrintDocument.BeginPrint

Discussion 0
Questions 73

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

Options:

A.  

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

B.  

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

C.  

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

D.  

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

Discussion 0