Labour Day Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: geek65

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

Questions 4

Sam works as a Software Developer for SamTech Inc. He creates an XML Web service, named

WebService1, using Visual Studio .NET. WebService1 uses the .NET Framework security class libraries to implement security. It implements role-based authorization based on a SQL Server database containing user names. Sam adds the following statements to the Web service codE. using System.Security.Principal; using System.Threading;

Sam wants to ensure that only validated users are permitted to access WebService1 by entering their user names and passwords in TextBox controls, named Text1 and Text2. He wants to implement imperative security check on WebService1. He also wants to ensure that users are assigned the Manager role and the Subordinate role by default. Which of the following classes will Sam use to accomplish the task?

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

Options:

A.

WindowsPrincipal

B.

GenericIdentity

C.

WindowsIdentity

D.

GenericPrincipal

Buy Now
Questions 5

You work as a Software Developer for ABC Inc. You are defining a component for an application. In some deployments, the component will be deployed on the same computer as the application. In other deployments the component will be deployed on a separate computer. The component has implicit dependencies and needs to access and use server-side resources that cannot cross system boundaries.

You must ensure that your component design supports both deployment scenarios. What will you do to accomplish the task?

Options:

A.

Create a SingleCall object.

B.

Create a marshal-by-value object.

C.

Create a marshal-by-reference object.

D.

Create a Singleton object.

Buy Now
Questions 6

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

Buy Now
Questions 7

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

Buy Now
Questions 8

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

Buy Now
Questions 9

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

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

Options:

A.

Use Microsoft SQL Server stored procedures for data calculations.

B.

Implement a batch processing system for data calculations.

C.

Create more than one database for data manipulations.

D.

Use SQL Server indexes to optimize data calculations.

Buy Now
Questions 10

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

Options:

A.

try

{

Connection1.open();

}

catch(DataException Myexcept)

{

//Error-handling code

}

B.

try

{

Connection1.open();

}

catch(SqlException Myexcept)

{

//Error-handling code

}

C.

try

{

Connection1.open();

}

catch(DBConcurrencyException Myexcept)

{

//Error-handling code

}

D.

try

{

Connection1.open();

}

catch(InvalidCastException Myexcept)

{

//Error-handling code

}

Buy Now
Questions 11

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.

Buy Now
Questions 12

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

Buy Now
Questions 13

You work as a Software Developer for ABC Inc. You use Visual Studio .NET to develop a Windows application named MyWindowApp. You implement the security classes of the .NET Framework. When users interact with the application, the role-based validation should perform frequently. You must ensure that only validated Windows NT or Windows 2000 domain users are permitted to access the application. You add the appropriate Imports statements for the System.Security.Principal namespace and the System.Threading namespace. Which of the following code segments will you use to accomplish this task?

Options:

A.

Dim identity As WindowsIdentity = _WindowsIdentity.GetAnonymous()

Dim myprincipal As New WindowsPrincipal(identity)

B.

AppDomain.CurrentDomain.SetThreadPrincipal(_

PrincipalPolicy.WindowsPrincipal)

Dim myprincipal As WindowsPrincipal = _CType(Thread.CurrentPrincipal, WindowsPrincipal)

C.

Dim identity As WindowsIdentity = WindowsIdentity.GetCurrent()

Dim myprincipal As New WindowsPrincipal(identity)

D.

AppDomian.CurrentDomain.SetPrincipalPolicy(_

PrincipalPolicy.WindowsPrincipal)

Dim myprincipal As WindowsPrincipal = _CType(Thread.CurrentPrincipal, WindowsPrincipal)

Buy Now
Questions 14

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create a Web application using .NET Framework 3.5.

You want to attach the Visual Studio Debugger to Internet Explorer when the application is running. Which of the following steps will you take to accomplish the task?

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

Options:

A.

In Visual Studio, go to the Debug menu and select Start Debugging.

B.

In Visual Studio, go to the Debug menu, click Windows, and then click Script Explorer.

C.

In the Attach to Process dialog box, select the instance of Internet Explorer (iexplorer.exe) to be attached to the debugger.

D.

In Visual Studio, go to the Debug menu and click Attach to Process.

Buy Now
Questions 15

Andrew works as a Software Developer for BlueWell Inc. He develops a Windows-based application, named App1, using Visual Studio .NET. The application uses Microsoft SQL Server as a backend database. Andrew wants to perform security checks on App1. Which of the following statements regarding security checks are true?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Declarative security check works by instantiating security classes.

B.

Declarative security check works by assigning attributes to assemblies.

C.

Imperative security check works by instantiating security classes.

D.

Imperative security check works by assigning attributes to assemblies.

Buy Now
Questions 16

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

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

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

Options:

A.

IFormatter

B.

IFormatable

C.

IRemotingFormatter

D.

IComparable

Buy Now
Questions 17

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

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

Options:

A.

Windows service

B.

Windows Form

C.

.NET remote object

D.

XML Web service

Buy Now
Questions 18

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

Options:

A.

try

{

NewConnection.Open();

}

catch(DBConcurrencyException exep)

{

//Error-handling code

}

B.

try

{

NewConnection.Open();

}

catch(SqlException exep)

{

//Error-handling code

}

C.

try

{

NewConnection.Open();

}

catch(DataException exep)

{

//Error-handling code

}

D.

try

{

NewConnection.Open();

}

catch(InvalidCastException exep)

{

//Error-handling code

}

Buy Now
Questions 19

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

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

Options:

A.

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

B.

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

C.

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

D.

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

Buy Now
Questions 20

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 contains two HTML pages named Error.htm and

PageNotFound.htm. You want to make sure that the following requirements are met:

l When any user requests a page that does not exist, the PageNotFound.htm page is

displayed.

l When any other error occurs, the Error.htm page is displayed. Which of the following code segments will you add to the Web.config file to accomplish this task?

Options:

A.

B.

C.

D.

Buy Now
Questions 21

What is the main purpose of a try-catch block?

Options:

A.

To obtain and use resources that are being caught.

B.

To signal the occurrence of an exception during the program execution.

C.

To catch and handle an exception generated by an executable code.

D.

To ensure that the necessary cleanup of external resources is done immediately.

Buy Now
Questions 22

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

Buy Now
Questions 23

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

Buy Now
Questions 24

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 are not using an exception handling framework in the application. However, the application must automatically log all unhandled exceptions to an event log. You are required to configure the Web.config file accordingly. Which of the following configurations will you use to accomplish the task?

Options:

A.

B.

C.

D.

Buy Now
Questions 25

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

Buy Now
Questions 26

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

Options:

A.

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

B.

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

C.

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

D.

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

Buy Now
Questions 27

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

Options:

A.

MethodCallExpression

B.

Expression(TDelegate)

C.

Expression

D.

LambdaExpression

Buy Now
Questions 28

Mark works as a Software Developer for GenTech Inc. He develops an application, named App1, using Visual Studio .NET. The application contains a Form control, named Form1, which enables users to edit information in a SQL Server database. Mark wants to save all the changes made by users in the database. He defines a boolean variable, named DataIsSaved, in the application code. DataIsSaved indicates whether or not all data are saved in the database. Mark wants to prevent Form1 from closing until all the changes are saved in the database. Which of the following code will he use to accomplish this?

Options:

A.

protected void Form1_Leave(object sender, System.ComponentModel.CancelEventArgs e) {

if(!DataIsSaved)

B.

Cancel = false;

else

C.

Cancel = true;

}

D.

protected void Form1_Leave(object sender, System.ComponentModel.CancelEventArgs e) {

if(!DataIsSaved)

E.

Cancel = true;

else

F.

Cancel = false;

}

G.

protected void Form1_Closed(object sender, System.ComponentModel.CancelEventArgs e) {

if(!DataIsSaved)

Buy Now
Questions 29

You work as a Software Developer for Hi-Tech Inc. You develop an application using Visual Studio .NET 2005. You create an unregistered COM DLL file named Com1.dll. You want to use this Com1.dll file in your application code. However, Com1.dll needs to be registered in the Windows Registry before it is used by the application. Which of the following tools will you use to accomplish the task?

Options:

A.

Wsdl.exe

B.

Regsvr32.exe

C.

Tlbimp.exe

D.

Disco.exe

Buy Now
Questions 30

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.

Buy Now
Questions 31

ECMAScript is supported in many applications and is commonly known as __________.

Options:

A.

VBScript

B.

AJAX

C.

JavaScript

D.

Script

Buy Now
Questions 32

You work as a Software Developer for ABC Inc. The Company uses .NET Framework 2.0 as its application development platform. You are creating an application that will perform different types of comparison operations. Therefore, you decide to use only those methods that are available in all the classes of .NET Framework 2.0. Which of the following methods will you use to accomplish the task?

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

Options:

A.

Compare

B.

ToString

C.

Copy

D.

Equals

E.

GetType

Buy Now
Questions 33

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

Buy Now
Questions 34

ASP.NET version 2.0 health monitoring supports an __________.

Options:

A.

Event driven model

B.

Event provider model

C.

Event log model

D.

Event API model

Buy Now
Questions 35

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

What will you do to accomplish this task?

Options:

A.

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

B.

Create a SOAP extension to manage encryption for the message.

C.

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

D.

Create a SOAP filter to manage encryption for the message.

Buy Now
Questions 36

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application using .NET Framework 2.0. The application will be used by school children to read a sequential chain of characters. What will you do to accomplish this task?

Options:

A.

Use the File class.

B.

Use the TextWriter class.

C.

Use the TextReader class.

D.

Use the BinaryReader class.

Buy Now
Questions 37

Which of the following is a restriction operator in LINQ?

Options:

A.

GROUPBY

B.

WHERE

C.

THENBY

D.

SELECTMANY

Buy Now
Questions 38

Which of the following is required to be implemented by marshal-by-value objects to implement custom serialization rules?

Options:

A.

ISerializable

B.

SerializableAttribute

C.

ISerializableAttribute

D.

ISerialize

Buy Now
Questions 39

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.

Tlbimp.exe

B.

GacUtil.exe

C.

Sn.exe

D.

Caspol.exe

E.

StoreAdm.exe

Buy Now
Questions 40

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

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

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

l Use the least amount of development effort.

What will you do?

Options:

A.

Use the XML format.

B.

Use the WPF format.

C.

Use the Binary Format Description format.

D.

Use the Java Script Notation format.

Buy Now
Questions 41

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

Buy Now
Questions 42

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

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

Options:

A.

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

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

StringWriter sw = new StringWriter(sb);

Object obj=(Object)b;

sw.Write(obj);

Console.WriteLine(sb);

sw.Close();

B.

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

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

StringWriter sw = new StringWriter(sb);

sw.Write(b);

Console.WriteLine(sb);

sw.Close();

C.

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

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

string str=new string(b);

StringWriter sw = new StringWriter(sb);

sw.Write(str);

Console.WriteLine(sb);

sw.Close();

D.

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

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

StringWriter sw = new StringWriter(sb);

sw.Write(b, 0, 5);

Console.WriteLine(sb);

sw.Close();

Buy Now
Questions 43

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

Options:

A.

BeginPrint

B.

QueryPageSettings

C.

PrintPage

D.

EndPrint

Buy Now
Questions 44

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

Buy Now
Questions 45

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.

Source

B.

StackTrace

C.

Message

D.

Data

E.

TraceSwitch

Buy Now
Questions 46

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

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

Options:

A.

Use the Marshal-by-value objects.

B.

Use the SerializableAttribute attribute.

C.

Use the MarshalByRefObject class.

D.

Use the IDisposable interface.

Buy Now
Questions 47

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application that reads data from and writes data to a file using the .NET Framework 2.0. You want to restrict users to read characters from a byte stream and write characters to a stream. Which of the following classes will you use to accomplish the task?

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

Options:

A.

StringReader

B.

StringWriter

C.

StreamReader

D.

StreamWriter

Buy Now
Questions 48

You work as a Software Developer for ABC Inc. You create a Web page named MyWebPage that displays detailed information of a registered user. The page contains a TextBox Web server control that requires the RangeValidator validation control to validate whether the user has entered the correct date of birth. A validation error message is displayed if the user has entered the value, which is greater than the date of registration. However, you want to ensure that the validation control on the Web page does not occupy any space, but share the same location for the display of error messages on the Web page. You also want to ensure that the layout of the Web page is changed when the error message is displayed. Which of the following actions will you take to accomplish the task?

Options:

A.

Design the Dynamic layout of the Web page.

B.

Implement the ValidationSummary control instead of the RangeValidator control.

C.

Design the Static layout of the Web page.

D.

Design the None layout of the Web page.

Buy Now
Questions 49

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 will process one million records in a production environment. Therefore, you need to test the application by using 7,500 records in a limited test environment to identify potential problems that might arise when the application is moved to the production environment. What will you do?

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

Options:

A.

Test the resource files.

B.

Test the thread pool pattern usage.

C.

Test the collection type usage.

D.

Test the number of MSI files used for deployment.

Buy Now
Questions 50

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 implements a dynamic data structure for storing valuable data of different types (String, Integer, etc). You develop the application and implement the generic dynamic data structure that can be increased or decreased as and when required. You want to read the data from the data structure. Which of the following enumerators will you use to accomplish the task?

Options:

A.

LinkedList.Enumerator

B.

Stack.Enumerator

C.

Queue.Enumerator

D.

List.Enumerator

Buy Now
Questions 51

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

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

Options:

A.

Specify User.Identity to authenticate the user.

B.

Set the impersonate attribute of the element to true.

C.

Specify the username and password attributes.

D.

Set the impersonate attribute of the element to false.

Buy Now
Questions 52

Allen works as a Software Developer for ManSoft Inc. He uses Microsoft Visual Studio 2005 to create a Web service named MyWebService. He wants to create a policy file with the help of WSE 3.0, which makes creating policy assertions files fairly straightforward. A policy assertion is a combination of the capabilities and requirements of the Web service. Allen initially writes the following steps to create and implement a policy file:

l He creates a stud to hold the policy elements. This task is accomplished by creating a config file known as a policy file or a policy cache file.

l He creates a set of policy assertions. There exists a set of assertions that can be used.

l He references the policy file from the application configuration file.

After completing these steps, the structure of the policy file is created. Now, he wants to use the structure of the policy file to inject input filters, output filters, or both, into the processing pipeline.

Which of the following policy file structures will Allen use to accomplish the task?

Options:

A.

B.

C.

D.

Buy Now
Questions 53

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.

Buy Now
Questions 54

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

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

Options:

A.

RSA

B.

None

C.

DES

D.

MD5

E.

SHA1

F.

3DES

Buy Now
Questions 55

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

Buy Now
Questions 56

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

Options:

A.

FileStream

B.

NetworkStream

C.

BufferedStream

D.

MemoryStream

Buy Now
Questions 57

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.

Buy Now
Questions 58

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

Buy Now
Questions 59

Maria works as a Software Developer for MaryLync Inc. She develops an application using Visual C# .NET, for National Stock Broker Inc. The application is used to handle sales and purchase of shares. She wants to ensure that whenever an error occurs in the code, the user is directed to an error page called error1.aspx. She writes a class named StockBroker that contains the code for real stock application. Which of the following attributes of the @ Page directive should she use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Inherits

B.

Description

C.

ErrorPage

D.

Culture

Buy Now
Questions 60

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

OleDbCommand cmd = new OleDbCommand();

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

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

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

Options:

A.

Use a Cache object to execute the program code.

B.

Use a SqlCommand object instead of an OleDbCommand object.

C.

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

D.

Use an OleDbDataReader object to execute the program code.

E.

Use database indexing.

F.

Use a stored procedure instead of the CommandText property.

Buy Now
Questions 61

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 is for members only. The behavior of the Web application varies according to the role of the user. The Web application uses the ASP.NET Membership control for creation of user accounts. You are required to find out whether a user is a member of a specific role. What will you do?

Options:

A.

Pass the role names to the User.IsInRole method.

B.

Pass the user names and passwords to the Membership.ValidateUser method.

C.

Pass the role names to the Roles.RoleExists method.

D.

Pass the user names to the User.IsUserInRole method.

Buy Now
Questions 62

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

Semaphore tSema = new Semaphore(0, 5);

...

tSema.Release(6);

What will the above code segment do?

Options:

A.

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

B.

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

C.

It will throw a SemaphoreFullException.

D.

It will throw a ThreadAbortException.

Buy Now
Questions 63

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 names for the application with three characters that are either "hat" or "cat". Which of the following regular expressions will you use to accomplish the task?

Options:

A.

[hc]at$

B.

^[hc]at

C.

[hc]at

D.

.at

Buy Now
Questions 64

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)

Buy Now
Questions 65

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

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

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

Buy Now
Questions 66

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

Options:

A.

string NewResult = string.Empty;

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

While (!Strreader.EndOfStream) {

NewResult += Strreader.ToString();

B.

string NewResult = null;

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

NewResult = Strreader.ReadLine();

C.

string NewResult = null;

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

NewResult = Strreader.ReadToEnd();

D.

string NewResult = null;

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

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

Buy Now
Questions 67

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

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

Options:

A.

The element.

B.

A managed code.

C.

The element.

D.

An unmanaged code.

Buy Now
Questions 68

Martha works as a Software Developer for NetCom Inc. She develops an application, named App1, using Visual Studio .NET. The application contains a form, named MyForm1. MyForm1 contains several controls including a TextBox, named txtDOB. The txtDOB control is used to accept the date of birth from a user. In order to ensure that a user enters a valid date in txtDOB, Martha adds validation logic to the Validating event of txtDOB. When she tests the form by using some invalid dates in txtDOB, the validation logic does not appear to be working as expected. What is the most likely cause of the issue?

Options:

A.

Martha has set the Locked property of txtDOB to True.

B.

Martha has set the CausesValidation property of txtDOB to False.

C.

Martha has set the SuppressValidation property of txtDOB to True.

D.

Martha has set the TabIndex property of txtDOB to 0.

Buy Now
Questions 69

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating a .NET remoting application using .NET Framework 2.0. The object of the application will be shared by multiple applications. You want to use simple, modular, extensible, and XML-based protocol to exchange messages between remoting applications. What will you do to accomplish the task?

Options:

A.

Use the SOAP protocol.

B.

Use the SoapFormatter class.

C.

Use the BinaryFormatter class.

D.

Use client activated objects.

Buy Now
Questions 70

Peter works as a Software Developer for PatSoluTech Inc. He creates a .NET assembly using Visual Studio .NET. He wants to use this assembly in multiple .NET applications on a local computer. He decides to deploy the assembly into the global assembly cache (GAC). What will he do to accomplish the task?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Set the public attribute for the assembly.

B.

Register the assembly within the GAC using Gacutil.exe.

C.

Register the assembly within the GAC using Regasm.exe.

D.

Give a strong name to the assembly.

Buy Now
Questions 71

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create the definition for a Car class by using the following code segment:

public class Car {

[XmlAttribute(AttributeName = "category")]

public string CarType;

public string model;

[XmlIgnore]

public int year;

[XmlElement(ElementName = "mileage")]

public int miles;

public ConditionType condition;

public Car() {

}

public enum ConditionType {

[XmlEnum("Poor")] BelowAverage,

[XmlEnum("Good")] Average,

[XmlEnum("Excellent")] AboveAverage

}}

You create an instance of the Car class. You fill the public fields of the Car class as shown in the table below:

You are required to recognize the XML block that is produced by the Car class after serialization. Which of the following XML blocks represents the output of serializing the Car class?

Options:

A.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema "

category="sedan">

racer

15000

Excellent

B.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema ">

sedan

racer

15000

Excellent

C.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema ""

CarType="sedan">

racer

15000

AboveAverage

D.

xmlns:xsi="http://www.w3.org/2002/XMLSchema-instance "

xmlns:xsd="http://www.w3.org/2002/XMLSchema "

category="sedan">

racer

15000

Excellent

Buy Now
Exam Code: GSSP-NET-CSHARP
Exam Name: GIAC GIAC Secure Software Programmer - C#.NET
Last Update: Apr 29, 2024
Questions: 491
GSSP-NET-CSHARP pdf

GSSP-NET-CSHARP PDF

$28  $80
GSSP-NET-CSHARP Engine

GSSP-NET-CSHARP Testing Engine

$33.25  $95
GSSP-NET-CSHARP PDF + Engine

GSSP-NET-CSHARP PDF + Testing Engine

$45.5  $130