New Year Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: cramtick70

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

Questions 4

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create a Windows Forms

application using .NET Framework 3.5. You need to execute a method named ProcAmount in the background of the application. The method requires that an integer value 101 is passed to it. You are required to pass an integer value 101 to start a background thread. Which of the following code segments should you use?

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

Options:

A.

ParameterizedThreadStart tStart;

tStart = new ParameterizedThreadStart(ProcAmount);

Thread thd = new Thread(tStart);

B.

thd.Start(101);

C.

ThreadStart tStart = new ThreadStart(ProcAmount);

Thread thd = new Thread(tStart, 101);

D.

thd.Start();

Buy Now
Questions 5

You work as an Enterprise Application Developer for Mansoft Inc. You are participating in the

design for a Web-based Order Management System. There are a few configuration options, such as applicable tax percentage, repeat customer discount percentage, etc., which are applicable to all the users of the Order Management System. However, these configuration options might be changed in the future. Which of the following techniques will you use to maintain this information from the performance and maintenance point of view?

Options:

A.

Application state

B.

Database support

C.

Profile properties

D.

Session state

Buy Now
Questions 6

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 7

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

Buy Now
Questions 8

Sandra works as a Software Developer for ABC Inc. She develops an application named MyApp that contains a data-bound control named MyDataControl. She wants to use an Oracle database in order to bind data to MyDataControl. Which of the following GUI-based data sources will Sandra use to accomplish the task?

Options:

A.

AccessDataSource

B.

SqlDataSource

C.

ObjectDataSource

D.

XmlDataSource

E.

SitemapDataSource

Buy Now
Questions 9

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.

Buy Now
Questions 10

Mark works as a Software Developer for CyberNet Inc. He develops a serviced component, named MyComponent1, using Visual Studio .NET. MyComponent1 uses a SQL Server database. In the code, Mark uses the ExecuteNonQuery method of the SqlCommand class to execute a Transact- SQL statement. Which of the following values will the ExecuteNonQuery method return?

Options:

A.

A string type value

B.

A boolean type value

C.

An integer type value

D.

A double type value

Buy Now
Questions 11

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 12

Mark works as a Web Developer for TechCom Inc. He creates an ASP.NET application named

Application1 by using Visual Studio .NET. Only registered users of the company will be able to use the application. The application contains a page named UserAcc.aspx that allows new users to register themselves to the registered users' list of the company. The UserAcc page contains several text box controls that accept users' personal details such as user name, password, home address, zip code, phone number, etc. One of the text box controls on the page is named ZipProperty in which a user enters a zip code.

Mark wants to ensure that when a user submits the UserAcc page, ZipProperty must contain five numeric digits. Which of the following validation controls will he use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

Options:

A.

RequiredFieldValidator

B.

RangeValidator

C.

CompareValidator

D.

RegularExpressionValidator

E.

RequiredValidator

Buy Now
Questions 13

Nick works as a Programmer for ES International Ltd. The company is a manufacturer and a dealer of new cars. This year, the annual sales report of the company showed that the sale of its Escort car model dropped significantly. To lower the inventory of the Escort car model, the company management finally decided to give a 25 to 30 percent discount on the Escort model. Nick receives an XML document that contains a list of the company's car models. Nick wants to load the incoming XML document into a memory stream. He also needs to use another XML document. Which of the following methods will he use to accomplish this task?

Each correct answer represents a complete solution. Choose two.

Options:

A.

LoadXml()

B.

WriteTo()

C.

Load()

D.

ImportNode()

Buy Now
Questions 14

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

Options:

A.

GenericIdentity identity =

new GenericIdentity(UserName.Text);

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

WindowsPrincipal principal = new WindowsPrincipal(identity);

B.

WindowsIdentity identity =

new WindowsIdentity.GetAnonymous();

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

WindowsPrincipal principal = new GenericPrincipal(identity, RoleArray);

C.

GenericIdentity identity =

new GenericIdentity(UserName.Text);

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

GenericPrincipal principal = new GenericPrincipal(identity, RoleArray);

D.

WindowsIdentity identity =

new WindowsIdentity.GetCurrent();

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

GenericPrincipal principal = new GenericPrincipal(identity, RoleArray);

Buy Now
Questions 15

You work as a Software Developer for ABC Inc. You develop a Windows application named

MyApp1. MyApp1 contains a Windows form named MyWinForm1. The form uses several controls such as Button, TextBox, and Label. You want mouse click events to be raised in the form. You want to use the mouse events that pass an instance of EventArgs in the signature of the event handler of a Button control. Which of the following events will you use in the application to accomplish the task?

Each correct answer represents a complete solution. Choose three.

Options:

A.

MouseMove

B.

MouseDown

C.

MouseHover

D.

MouseEnter

E.

MouseUp

F.

MouseLeave

Buy Now
Questions 16

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 17

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating a Web application using .NET Framework 2.0. The application is accessed by ABC users and some of ABC's affiliates. All users who access theapplication must have their credentials stored in the UCData database. You need to implement a login page that authenticates users against the UCData database. What will you do?

Options:

A.

In the Web.config file, set the Authentication Mode to Passport.

B.

In the Web.config file, set the Authentication Mode to None.

C.

In the Web.config file, set the Authentication Mode to Windows.

D.

In the Web.config file, set the Authentication Mode to Forms.

Buy Now
Questions 18

Which of the following utilities is used to encrypt credentials and session state connection strings?

Options:

A.

Aximp.exe

B.

Aspnet_regiis.exe

C.

Aspnet_compiler.exe

D.

Aspnet_setreg.exe

Buy Now
Questions 19

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

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

Options:

A.

Define views in the database.

B.

Add constraints to the EmployeeData table.

C.

Define triggers in the EmployeeData table.

D.

Define indexes in the EmployeeData table.

E.

Add stored procedures by using Transact-SQL queries.

Buy Now
Questions 20

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

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

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

Options:

A.

Call the Validate method of the validation control.

B.

Check the IsValid property of the validation control.

C.

Handle the Page_Init event handler.

D.

Handle the Page_Load event handler.

Buy Now
Questions 21

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

Options:

A.

XmlValidatingReader

B.

XmlTextReader

C.

XmlNodeReader

D.

XmlReader

Buy Now
Questions 22

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You have recently finished development of an ASP.NET Web application using .NET Framework 3.5. You deploy the application on a test server and enable the debugging. The application is hosted in IIS 6.0 and uses the default authentication. Integrated

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

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

Options:

A.

B.

C.

D.

Buy Now
Questions 23

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

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

Options:

A.

Using an ASP.NET membership for authentication.

B.

Sending e-mail messages to the users.

C.

Using the PasswordRecovery control.

D.

Using the ChangedPassword control.

Buy Now
Questions 24

Which of the following modes can be used to configure the Remote Debugging Monitor for remote debugging?

Options:

A.

Password Authentication

B.

Form Authentication

C.

No Authentication

D.

SQL Server Authentication

Buy Now
Questions 25

Which of the following is not a method of controlling traffic through a firewall?

Options:

A.

Application filtering

B.

Encryption-level filtering

C.

Stateful inspection

D.

Packet filtering

Buy Now
Questions 26

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

Buy Now
Questions 28

Which of the following is the best way to authenticate users on the intranet?

Options:

A.

Forms authentication

B.

NT authentication

C.

Mutual authentication

D.

Basic authentication

Buy Now
Questions 29

You work as a Software Developer for ABC Inc. You create an application, and you want to define a component for your 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. You create a Web service. You want a new object of the Web service to be created whenever a customer makes a call to the Web service. Drag and drop the appropriate statement to accomplish the task.

Options:

A.

Buy Now
Questions 30

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

Buy Now
Questions 31

You work as a Software Developer for ManSoft Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You create an application that will be used by all the branches of the company. You use the Regex class in the application to validate some strings. You want to search an input string for an occurrence of a regular expression. Which of the following methods of the Regex class will you use to accomplish the task?

Options:

A.

Match

B.

Matches

C.

Equals

D.

IsMatch

Buy Now
Questions 32

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

Options:

A.

Structure

B.

Delegate

C.

Enumeration

D.

Interface

Buy Now
Questions 33

Perry works as a Web Developer for BlueWell Inc. He creates a catalog application named MyCatalog for a server using Visual Studio .NET. MyCatalog contains data that describes the pricing values of design catalogs. He wants to ensure that only authenticated users are authorized to access the data. He also wants the data to be secured at the highest level of authentication. Which of the following authentication levels will Perry use to accomplish this?

Options:

A.

Packet Privacy

B.

Packet Integrity

C.

Packet

D.

Call

Buy Now
Questions 34

John works as a Software Developer for Blue Well Inc. He wants to create a class named Class1 and implements the generic IComparable interface. He writes the following code:

public class Class1 : System.IComparable

{

}

However, John needs to compare one object of Class1 with another object. Which of the following code statement will John include in his application?

Options:

A.

public int CompareTo(object obj){}

B.

public object CompareTo(int obj){}

C.

public object CompareTo(Class1 obj){}

D.

public int CompareTo(Class1 obj){}

Buy Now
Questions 35

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

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

Options:

A.

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

B.

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

C.

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

D.

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

E.

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

F.

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

Buy Now
Questions 36

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

Options:

A.

HTML server controls

B.

Web server controls

C.

Validation controls

D.

HTML controls

Buy Now
Questions 37

John works as a Software Developer for DawnStar Inc. He creates a class, named MyClass1. He wants to generate a key pair that he will use to give the compiled assembly a strong name. Which of the following tools will he use to accomplish the task?

Options:

A.

Installutil.exe

B.

Gacutil.exe

C.

Sn.exe

D.

Al.exe

Buy Now
Questions 38

Which of the following is not a type of Remote object?

Options:

A.

Server-activated object

B.

Client-activated object

C.

Singleton object

D.

Single call object

Buy Now
Questions 39

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.

Buy Now
Questions 40

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

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 are creating an application using .NET Framework 2.0. The application uses serialization to allow users to take an instance of an object and convert it into a format that can be easily transmittable over the network or even stored in a database. You want to provide the base functionality for the common language runtime serialization formatters. Which of the following classes will you use to accomplish the task?

Options:

A.

SoapFormatter

B.

FormatterConverter

C.

Formatter

D.

BinaryFormatter

Buy Now
Questions 42

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

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

Options:

A.

They do not contain any executable code.

B.

An application can have only one satellite assembly.

C.

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

D.

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

Buy Now
Questions 43

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

Options:

A.

AES

B.

TripleDES

C.

DES

D.

RSA

Buy Now
Questions 44

Which of the following APIs is used to collect information about any running state and any errors that occur within an ASP.NET application?

Options:

A.

Profile API

B.

Health Monitoring API

C.

Error Handling API

D.

Personalization API

Buy Now
Questions 45

John works as a Web Developer for Bitsoft 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 result. MyApp1 contains an ASP.NET page named, named Page1. Page1 contains a TextBox control, named txtEnrolmentNo, and two Button controls, named btnSubmit and btnCancel respectively.

John wants that if a user tries to submit the page by clicking the Submit button without entering his enrolment the word "Required" appears next to txtEnrolmentNo. However, when a user clicks the Cancel button he is redirected to a new page, named PageCancel.aspx. To accomplish this he adds a RequiredFieldValidator control to the page and sets its ControlToValidate and ErrorMessage properties to txtEnrolmentNo and "Required" respectively. However, when he executes the application he finds that the validation check is also performed on clicking the Cancel button. What is the most likely cause of the issue?

Options:

A.

The CauseValidation property of btnSubmit is not set to True.

B.

The CauseValidation property of btnCancel is not set to True.

C.

The CauseValidation property of btnSubmit is not set to False.

D.

The CauseValidation property of btnCancel is not set to False.

Buy Now
Questions 46

You work as a Software Developer for WebTech Inc. You create a Web service named Utils. You want a new object of Utils to be created whenever a customer makes a call to the service. Which of the following will accomplish this task?

Options:

A.

Create Utils as a SingleCall object.

B.

Create Utils as a Singleton object.

C.

Create Utils as a Marshal By Value object.

D.

Create Utils as a Marshal By Reference object.

Buy Now
Questions 47

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 that will perform statistics calculations using .NET Framework. You want to ensure that the application is capable of performing multiple calculations concurrently. What will you do to accomplish the task?

Options:

A.

Set the Process.GetCurrentProcess().BasePriority property to High.

B.

Set the ProcessorAffinity property of the ProcessThread class object.

C.

For every calculation, call the QueueUserWorkItem method of the ThreadPool class.

D.

Set the IdealProcessor property of the ProcessThread class object.

Buy Now
Questions 48

You work as a Software Developer for ABC Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You 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 49

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 50

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You are creating an ASP.NET Web application using .NET Framework 3.5. The application will be accessed by Internet users. You need to enable users to authenticate from the client-side script. You add the following code fragment in the Web.config file of the application:

You must configure the application to ensure that user credentials are validated against Active Directory by using the client-side script. What will you do to accomplish this?

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

Options:

A.

Add the following code fragment to the Web.config file of the application:

B.

Configure the application to use the ActiveDirectoryMembershipProvider class.

C.

Add the following code fragment to the Web.config file of the application:

D.

Configure the application to use the SqlMembershipProvider class.

E.

Add the following code fragment to the Web.config file of the application:

Buy Now
Questions 51

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 company hosts a Web site. The Web site offers an online community and shows personal information of the site members. An e-mail account that is used as the user name is compulsory to register with the online community. Therefore, only registered users of the Web site can view the personal information of other members. You are required to ensure that illegal, automated scripts or bots are not permissible to carry out any of the following tasks:

l Register with the Web site.

l Access the personal information of the members.

What will you do?

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

Options:

A.

Bind all personal information of the members within SPAN and DIV controls that will toggle to show/hide.

B.

Implement a CAPTCHA image control during the registration and login process.

C.

Deny new user accounts access to the Web site as long as the user does not respond to the e-mail message.

D.

Implement CDATA during the registration and login process.

E.

Implement a one-way function during login process.

F.

Send confirmation email messages to all new registered users.

Buy Now
Questions 52

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.

Buy Now
Questions 53

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 is hosted on Microsoft Windows Server 2008. Only FTP access is available to the server. You need to improve the searching of the pages in the search engines by taking action to URLs that do not have an .aspx file extension. You must ensure that all pages as well as static content can also be requested. What will you do to accomplish this?

Options:

A.

Use an HttpHandler object.

B.

Use a Request object.

C.

Use an HttpModule object.

D.

Use an ISAPI filter.

Buy Now
Questions 54

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.

Buy Now
Questions 55

You work as a Software Developer for ManSoft Inc. The company uses Visual Studio.NET as its application development platform. You create an application using the .NET Framework. You use ManSoft's intranet to deploy the application to client computers. You use the security configuration of the .NET Framework to configure security for the application at the enterprise policy level. Virus attacks caused the IT manager at ManSoft Inc. to tighten the security at the machine level. Users reported that they could no longer execute the application. Which of the following options will you use to resolve this issue?

Options:

A.

Include the LevelFinal attribute in the intranet code group policy at the enterprise level by using the Code Access Security Policy tool (Caspol.exe).

B.

Include the Exclusive attributes in the intranet code group policy at the enterprise level by using the Code Access Security Policy tool (Caspol.exe).

C.

Include the LevelFinal attribute in the intranet code group policy at the enterprise level by using the Permission View tool (Permview.exe).

D.

Include the Exclusive attribute in the intranet code group policy at the enterprise level by using the Permission View tool (Permview.exe).

Buy Now
Questions 56

Jackson works as a Programmer for a life insurance company. He creates an application named App1 using Visual Studio .NET. App1 uses a SQL Server database named Database1. Jackson creates a SqlDataAdapter object named Data1 in App1. Jackson wants to ensure that the performance of App1 improves. Which of the following objects will he use in conjunction with the Data1 object when connecting to Database1?

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

Options:

A.

SqlConnection

B.

OleDbConnection

C.

SqlDataReader

D.

SqlCommand

Buy Now
Questions 57

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

l Root Web

l Web application root directory

l Web site

l Web application subdirectory

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

Options:

A.

Proxy auto-config

B.

ApplicationName.config

C.

Manhine.config

D.

Web.config

Buy Now
Questions 58

You work as a Software Developer for ManSoft Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You create an application that will be used by all the branches of the company. You want to use declarative attributes that configure security for a serviced component of the application. Which of the following attributes will you use in order to support component, interface, or method level role checks?

Options:

A.

SecureMethod

B.

ComponentAccessControl

C.

SecurityRole

D.

ApplicationAccessControl

Buy Now
Questions 59

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

Options:

A.

Marshal By Reference object

B.

Singleton object

C.

SingleCall object

D.

Marshal By Value object

Buy Now
Questions 60

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

Buy Now
Questions 61

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 62

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

Options:

A.

Use a cookieless session state for storing information.

B.

Use the profile properties feature for storing information.

C.

Use the application state for storing information.

D.

Use the session state with cookie for storing information.

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

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

Options:

A.

The Finalize method of the BackgroundWorker class

B.

The Dispose method of the BackgroundWorker class

C.

The Dispose method of the Component class

D.

The Finalize method of the Component class

Buy Now
Questions 65

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

public class MyUtility

{

public MyUtility() { }

public void ChangeData() { }

}

The application must fulfill the following criteriA.

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

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

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

Options:

A.

Change the scope of the MyUtility class to private.

B.

Change the scope of the constructor to private.

C.

Change the scope of the constructor to internal.

D.

Change the scope of the MyUtility class to internal.

Buy Now
Questions 66

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

Buy Now
Questions 67

Charles works as a Web Developer for TechNet Inc. He develops an application named AdAgentsApp for advertising agents by using Visual Studio .NET. AdAgentsApp uses several Web services provided by the company. The employees in the IT department use only the existing port numbers 80 (HTTP protocol) and 443 (HTTPS protocol) for firewall security. However, they are forbidden to open any other new ports. These ports have been used to ensure the highest security level of authentication.

Which of the following actions should Charles take to maintain the highest security?

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

Options:

A.

Use Windows Basic Authentication with SSL.

B.

Use Windows Digest Authentication.

C.

Use Custom Authentication.

D.

Send the encrypted information in SOAP headers.

E.

Use Windows Authentication with Client Certificates.

Buy Now
Questions 68

Mark works as a Software Developer for TechBook Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. MyApp1 contains an ASP.NET page that is used to register new participants to a quiz contest, which is to be held recently in the city of New York. In order to take part in the quiz contest, an applicant must be between the age of fifteen and twenty-five. Mark adds a TextBox control, named txtDateOfBirth, to the page. He wants to ensure that each prospective participant enters his date of birth in txtDateOfBirth. He also wants to verify that prospective participants meet the age requirement. For this, Mark wants to use a custom client script function. He also wants to minimize the number of trips made to the server. Which of the following actions will Mark perform to accomplish the task?

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

Options:

A.

Add a RequiredFieldValidator control to the page. Set its ControlToValidate property to txtDateOfBirth.

B.

Set the ClientValidationFunction property of the CustomValidator control to the name of the script function that performs the client-side validation.

C.

Set the AutoPostBack property of txtDateOfBirth to True.

D.

Add a CustomValidator control to the page. Set its ControlToValidate property to txtDateOf Birth.

E.

Set the ClientValidationFunction property of txtDateOfBirth to the name of the script function that performs the client-side validation.

F.

Set the AutoPostBack property of txtDateOfBirth to False.

Buy Now
Questions 69

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

Buy Now
Questions 70

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

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

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

Options:

A.

StringWriter class

B.

FileInfo class

C.

BinaryWriter class

D.

DirectoryInfo class

Buy Now
Questions 71

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 72

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
Exam Code: GSSP-NET-CSHARP
Exam Name: GIAC GIAC Secure Software Programmer - C#.NET
Last Update: Dec 27, 2024
Questions: 491
GSSP-NET-CSHARP pdf

GSSP-NET-CSHARP PDF

$25.5  $84.99
GSSP-NET-CSHARP Engine

GSSP-NET-CSHARP Testing Engine

$30  $99.99
GSSP-NET-CSHARP PDF + Engine

GSSP-NET-CSHARP PDF + Testing Engine

$40.5  $134.99