Black Friday Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

GIAC GSSP-.NET Online Access

Page: 7 / 18
Total 491 questions

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

Question 25

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

GenericPrincipal principal = new GenericPrincipal(identity, RoleArray);

B.

GenericIdentity identity =

new GenericIdentity(UserName.Text);

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

WindowsPrincipal principal = new WindowsPrincipal(identity);

C.

WindowsIdentity identity =

new WindowsIdentity.GetCurrent();

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

GenericPrincipal principal = new GenericPrincipal(identity, RoleArray);

D.

WindowsIdentity identity =

new WindowsIdentity.GetAnonymous();

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

WindowsPrincipal principal = new GenericPrincipal(identity, RoleArray);

Question 26

You work as a Software Developer for ABC Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application using .NET Framework 2.0. The application will be used by all the branches of the company. You sometimes require a variable number of arguments to be passed to a method. For example, you may require a sum method, which calculates the total of the numbers passed to it no matter how many numbers are passed. What will you do to accomplish the task?

Options:

A.

Use the base keyword.

B.

Use the ref keyword.

C.

Use the params keyword.

D.

Use the out keyword.

E.

Use the volatile keyword.

Question 27

You work as an Application Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating an application that will match the location in a given string. You need to ensure that the match must begin at either the first character of the given string or the last character of a line in the string. Which of the following characters will you use to accomplish the task?

Options:

A.

\A

B.

$

C.

^

D.

\Z

Question 28

You work as a Software Developer for Blue Well Inc. You create a mobile Web application for mobile users. You want to ensure that a cookieless session is implemented on it. Which of the following statements are the main reasons of implementing a cookieless session on a mobile Web application?

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

Options:

A.

Tests mobile Web applications

B.

Stores data in Web server memory

C.

Ensures better compatibility with mobile devices

D.

Maintains session state of each user

Page: 7 / 18
Total 491 questions