Summer Sale - Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpm65

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

Questions 4

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

Options:

A.

[SecurityPermissionSecurityAction.LinkDemand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

B.

[SecurityPermission(SecurityAction.Deny,

Flags = SecurityPermissionFlag.UnmanagedCode)]

C.

[SecurityPermission(SecurityAction.Demand,

Flags=SecurityPermissionFlag.UnmanagedCode)]

D.

[SecurityPermission(SecurityAction.Assert,

Flags = SecurityPermissionFlag.UnmanagedCode)]

Buy Now
Questions 5

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

Options:

A.

Forms-based authentication

B.

Integrated Microsoft Windows authentication

C.

Basic authentication

D.

Digest authentication

Buy Now
Questions 6

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. You create a Web form in the application that permits users to provide personal information. You add a DropDownList control to the Web form to retrieve the residential status of users. The default item that the DropDownList control displays is the "Select Country" option. You have to ensure that users select a country other than the default option. Which of the following validation controls should you use to accomplish this task?

Options:

A.

RegularExpressionValidator

B.

RequiredFieldValidator

C.

RangeValidator

D.

CustomValidator

Buy Now
Questions 7

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 8

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 9

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You have recently finished development of an ASP.NET Web application using .NET Framework 3.5. The company's sales employees access the application, which is deployed on a Web server. You want to secure the Web server. To secure the Web server, you want to use cookieless forms authentication. Which of the following properties will you use to accomplish the task?

Options:

A.

CookieMode

B.

CookieDomain

C.

FormsCookieName

D.

FormsCookiePath

Buy Now
Questions 10

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 Web services using the .NET Framework. The access control to Web services is part of your accountability. You are currently revealing an existing class as a XML Web service. You are required to ensure that the XML Web service is exclusively accessible to Web service clients within the ABC Inc. domain. To fulfill this requirement you want to change the access modifiers on methods that must be represented as Web methods. What will you do to accomplish this task?

Options:

A.

Use the Public access modifier for each Web method.

B.

Use the Private access modifier for each Web method.

C.

Use the Internal or Friend access modifier for each Web method.

D.

Use the Protected access modifier for each Web method.

Buy Now
Questions 11

You work as an ADO.NET Application Developer for ABC Inc. The company uses Microsoft Visual Studio .NET 2008 as its application development platform. You create an ADO.NET application by using .NET Framework 3.5. You write the following code in the application:

string tree = "ABC";

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

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

GSSP-NET-CSHARP Question 11

Options:

A.
Buy Now
Questions 12

Mark works as a Software Developer for McRobert Inc. He develops an ASP.NET application, named App1, using Visual Studio .NET. App1 retrieves purchase orders data from a SQL Server database and displays it in a DataGrid control, named DataGrid1. Mark wants to enable users to sort data in ascending or descending order, whenever they click a column. He writes code to sort the data in DataGrid1 using the SortOrder property. The SortOrder property stores a value "ASC" for ascending order and "DESC" for descending order. Mark wants to preserve the value during postbacks. Which of the following properties of the Control class will Mark use to accomplish this?

Options:

A.

Cache

B.

State

C.

ViewState

D.

Application

Buy Now
Questions 13

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 the development of a class named TestCase and you have used only reference types in the class. The class will be used in an application that will use pointers. Therefore, you are required to convert the reference types to pointers in the class. Which of the following keywords will you use to accomplish the task?

Options:

A.

base

B.

virtual

C.

override

D.

unsafe

Buy Now
Questions 14

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

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

Options:

A.

A strong name assures the uniqueness of a name.

B.

A strong name protects the root version of an assembly.

C.

A strong name provides a strong integrity check.

D.

A strong name creates different versions of an assembly.

Buy Now
Questions 15

You work as a Software Developer for Blue Well Inc. The company uses Visual Studio .NET 2005 as its application development platform. You create an application using Visual C# .NET and perform the following operations:

l Create a static array.

l Sort the array.

l Display the sorted array.

Which of the following code snippets will you use to accomplish the task?

Options:

A.

int array1[] = {12, 16, 18, 22};

Array.Sort(array1);

Console.WriteLine(array1[0], array1[1], array1[2], array1[3]);

B.

int[] array1 = {12, 16, 18, 22};

Array.Sort(array1);

Console.WriteLine("{0}, {1}, {2}, {3}");

C.

int[] array1 = {12, 16, 18, 22};

Array.Sort(array1);

Console.WriteLine("{0}, {1}, {2}, {3}", array1[0], array1[1], array1[2], array1[3]);

D.

int[] array1 = {12, 16, 18, 22};

Array.Sort(array1);

Console.WriteLine("{0}, {1}, {2}, {3}", array1[a], array1[b], array1[c], array1[d]);

Buy Now
Questions 16

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.

thd.Start(101);

B.

ParameterizedThreadStart tStart; tStart = new ParameterizedThreadStart(ProcAmount);

Thread thd = new Thread(tStart);

C.

thd.Start();

D.

ThreadStart tStart = new ThreadStart(ProcAmount);

Thread thd = new Thread(tStart, 101);

Buy Now
Questions 17

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

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

Each correct answer represents a complete solution. Choose two.

Options:

A.

Integrated Windows

B.

Extensible Authentication Protocol

C.

Windows NT

D.

Anonymous

E.

Basic

Buy Now
Questions 18

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You are developing an application using .NET Framework 2.0. You are required to use a datatype that will store only the numbers. The numbers should be in positive form and should not be larger than 65,535. Which of the following datatypes will you use to accomplish the task?

Each correct answer represents a complete solution. Choose two.

Options:

A.

int

B.

short

C.

System.UInt16

D.

ushort

E.

System.Int16

Buy Now
Questions 19

Sam works as a Software Developer for GenTech Inc. The company uses Visual Studio .NET as its application development platform. Sam develops an application named App1 using Visual C# .NET. App1 uses a non-COM DLL named Value1.dll, which contains unmanaged code. Sam wants to write a method named Method1 in Value1.dll. He wants to use Method1 for parsing a string into an array of string values and an array of numbers. He decides to specify three parameters for Method1. The first parameter will contain a static string value. After executing Method1, the second parameter will contain all string values found in the first parameter, and the third parameter will contain all integer values found in the first parameter. Sam wants to enable App1 to call this function. Which of the following code will he use to accomplish this?

Options:

A.

int Method1 Lib "Value1.dll"(string, out string, out int);

B.

int Method1 Lib "Value1.dll"(string, ref string, ref int);

C.

int Method1 Lib "Value1.dll"(ref string, string, int);

D.

int Method1 Lib "Value1.dll"(string, string, int);

Buy Now
Questions 20

Bill works as a Software Developer for SunInfo Inc. He develops an application named SunApplication using C# .NET. The employees of the company use SunApplication for viewing and editing inventory data. SunApplication receives data from a file named MyFile.xml, which currently does not provide any information. Bill decides to write code to get information from the MyFile.xml file. Which of the following code segments will he use to resolve the issue?

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

Options:

A.

FileInfo FI = new FileInfo(@"c:\temp\MyFile.xml");

Console.WriteLine("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

B.

FileInfo FI = new FileInfo ("@c:\program files\temp\MyFile.xml");

Console.WriteLine ("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

C.

FileInfo FI = new FileInfo("MyFile.xml");

Console.WriteLine("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

D.

string str=@"c:\windows\MyFile.xml";

FileInfo FI = new FileInfo (str);

FI.Open (FileMode.Open, FileAccess.Read);

Console.WriteLine("Filename " + FI.FullName );

Console.WriteLine(" Created at " + FI.CreationTime );

Console.WriteLine(" Accessed at " + FI.LastAccessTime );

Buy Now
Questions 21

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 are using the CompareInfo class for culture-sensitive string comparisons. You write the following code in the application:

String s1 = "C rtify";

String s2 = "c rtify";

String s3 = "c rtify";

You need to compare the s1 string with the s2 string and ensure that the string comparison must ignore case. Which of the following code segments will you use to accomplish the task?

Options:

A.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.IgnoreCase));

B.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.None));

C.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.Ordinal));

D.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

Console.WriteLine(cmp.Compare(s1, s2, CompareOptions.OrdinalIgnoreCase));

Buy Now
Questions 22

Which of the following modifiers is not available in C#?

Options:

A.

private

B.

friend

C.

internal

D.

public

E.

protected

Buy Now
Questions 23

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.

Previously loaded assemblies

B.

The application base or root directory

C.

The Gacutil.exe tool in the Global Assembly Cache

D.

Sub-directories in the application's root directory

E.

The culture attribute of the assembly

F.

The correct version of the assembly

G.

The assembly's name

Buy Now
Questions 24

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a class library using the .NET Framework. The library will be used to open the NSCs of computers. Later, you will set up the class library to the GAC and provide it Full Trust permission. You write down the following code segments for the socket connections:

SocketPermission permission = new SocketPermission(PermissionState.Unrestricted);

permission.Assert();

A number of the applications that use the class library may not have the necessary permissions to open the network socket connections. Therefore, you are required to withdraw the assertion. Which of the following code segments will you use to accomplish the task?

Options:

A.

permission.PermitOnly();

B.

CodeAccessPermission.RevertDeny();

C.

permission.Deny();

D.

CodeAccessPermission.RevertAssert();

E.

permission.Demand();

Buy Now
Questions 25

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 26

You work as a Web Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create an ASP.NET Web application using the .NET Framework. The application is installed in a Network Load Balancing cluster. You are evaluating a bug statement. When a failure takes place in the Web application, the client occasionally gets an error page as anticipated. At other times, the client gets an exception stack with the error message, which is not anticipated. You are required to find out the configuration setting that causes the unanticipated error.

Which of the following configuration settings causes the unanticipated error?

Options:

A.

B.

C.

D.

Buy Now
Questions 27

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

Options:

A.

Forms-based authentication

B.

Integrated Microsoft Windows authentication

C.

Basic authentication

D.

Digest authentication

Buy Now
Questions 28

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create an ASP.NET Web application using 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 29

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 30

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

Options:

A.

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

B.

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

C.

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

D.

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

{

int Var1 = 20;

int Var2 = 40;

int Var3 = 60;

}

Buy Now
Questions 31

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

Each correct answer represents a complete solution. Choose two.

Options:

A.

NegotiateStream

B.

SslStream

C.

Stream

D.

AuthenticatedStream

Buy Now
Questions 32

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You create a Windows service application that will be used by Visual Studio .NET applications. You want to ensure that an access to the Windows service is restricted. Therefore, you decide to use the ServiceInstaller class. You want to specify the security context of the Windows service application. Whic

Options:

A.

Password property

B.

UserName property

C.

Context property

D.

Account property

Buy Now
Questions 33

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create an ASP.NET Web application using the .NET Framework 3.5. The application is used to map HTTP requests to HTTP handlers based on a file name extension. You need to ensure that each HTTP handler processes individual HTTP URLs or groups of URL extensions in the application.

Which of the following built-in HTTP handlers will you use to accomplish this task?

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

Options:

A.

Generic Web handler (*.ashx)

B.

Generic handler (*.ashx)

C.

Web service handler (*.asmx)

D.

ASP.NET page handler (*.aspx)

E.

Trace handler (trace.axd)

Buy Now
Questions 34

Ricky works as a Software Developer for SoftTech Inc. He creates an XML Web service, named XmlWeb, by using Visual Studio .NET. He wants to publish XmlWeb within the company's intranet. Which of the following actions will Ricky take to publish XmlWeb?

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

Options:

A.

Register XmlWeb in the private UDDI registry.

B.

Use XML Spy to register XmlWeb.

C.

Register XmlWeb in the public UDDI registry.

D.

Build a discovery (disco) document for XmlWeb.

Buy Now
Questions 35

John works as a Web Developer for ProMetaworks Inc. He creates an ASP.NET application, named MyApp1, using Visual Studio .NET. MyApp1 contains a page, named Page1. Page1 contains several TextBox controls that accept users' input. John uses several validation controls on the page to validate input controls. He wants to display all the validation error messages on the page in a message box. However, he does not want the validation summary to be displayed inline on the Web page. What will he do to accomplish the task?

Options:

A.

Add a ValidationSummary control to the page. Set its ShowMessageBox and ShowSummary properties to true.

B.

Add a ValidationSummary control to the page. Set its DisplayMode property to MessageBox .

C.

Add a ValidationSummary control to the page. Set its ShowMessageBox property to true and ShowSummary property to false.

D.

Add a CustomValidator control to the page. Write a custom client-side script function. Set the ClientValidationFunction property of the control to the name of the function.

Buy Now
Questions 36

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a class library using the .NET Framework. The library will be used to open the NSCs of computers. Later, you will set up the class library to the GAC and provide it Full Trust permission. You write down the following code segments for the socket connections:

SocketPermission permission = new SocketPermission(PermissionState.Unrestricted); permission.Assert();

A number of the applications that use the class library may not have the necessary permissions to open the network socket connections. Therefore, you are required to withdraw the assertion. Which of the following code segments will you use to accomplish the task?

Options:

A.

CodeAccessPermission.RevertDeny();

B.

permission.Demand();

C.

permission.Deny();

D.

permission.PermitOnly();

E.

CodeAccessPermission.RevertAssert();

Buy Now
Questions 37

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2008 as its application development platform. You create an ASP.NET Web application using the .NET Framework 3.5. 91. The application uses ASP.NET AJAX, and you need to deploy it in a Web farm environment. You are required to configure SessionState for the application. Which of the following code segments will you use to accomplish this task?

Options:

A.

B.

C.

D.

Buy Now
Questions 38

You work as a Software Developer for ManSoft Inc. The company uses Visual Studio.NET 2005 as its application development platform. You have recently created an application that includes the code shown below.

string str1 = "ABC";

string str2 = "u";

str2 += "Certify";

Console.WriteLine(str1 == str2);

Console.WriteLine((Object) str1 == (Object) str2);

Console.WriteLine(str1.Equals(str2));

What will be the output of the above code?

Options:

A.

True

True

True

B.

True

False

True

C.

False

False

False

D.

False

True

False

Buy Now
Questions 39

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

Options:

A.

string MyArray[9] = new string;

B.

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

C.

string[] MyArray = new string[9];

D.

Option Base 1

string[] MyArray = new string[9];

E.

Option Base 0

string[] MyArray = new string[9];

Buy Now
Questions 40

Julia works as a Software Developer for Mansoft Inc. She develops an application using Visual Studio .NET. The application uses a method named MyMethod, which is located in an unmanaged DLL. Julia wants MyMethod to require the application to allocate unmanaged memory, fill the data, and pass the memory address to the application. She also wants to ensure that on returning from MyMethod, the application de-allocates the unmanaged memory. What will Julia do to accomplish the task?

Options:

A.

Use the methods of the MemoryStream class.

B.

Use the Marshal class.

C.

Derive a new class from the Stream class, and override the allocation methods.

D.

Use a byte array.

Buy Now
Questions 41

You work as a Software Developer for ManSoft Inc. The company has several branches worldwide. The company uses Visual Studio.NET 2005 as its application development platform. You are creating a global application that will be used by all the branches of the company. You want to perform the encoding of Unicode characters. Which of the following classes will you use to accomplish the task?

Each correct answer represents a complete solution. Choose three.

Options:

A.

UnicodeEncoding

B.

ASCIIEncoding

C.

UTF32Encoding

D.

UTF8Encoding

Buy Now
Questions 42

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

Options:

A.

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

B.

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

C.

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

D.

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

Buy Now
Questions 43

Mark works as a Web Developer for ABC Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. MyApp1 allows users to view and purchase company products.

It includes several pages. The start-up page of the application is Page1.aspx. He configures the application's Web.config file to use form-based authentication.

Mark wants users to log on to Page1.aspx by providing their user names and passwords. To accomplish this, he creates an ASP.NET page named UsersLogIn.aspx that allows each user to specify a user name and password. He then writes the following syntax in the Web.config filE.

<authentication mode="Forms">

<forms name="MyName"

loginUrl="/UsersLogIn.aspx"

protection="All"

timeout="60"

slidingExpiration="true">

</authentication>

What will be the result?

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

Options:

A.

The session will expire after 60 seconds.

B.

The session will expire after 60 minutes.

C.

The session will expire after 60 hours.

D.

The session lifetime will be reset periodically.

E.

The session will never expire.

F.

Once the session lifetime is set, it will not change.

Buy Now
Questions 44

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create an ASP.NET Web application using .NET Framework 3.5. The application is a library application that catalogs Classes and books. The application contains a DataContext object named Classes and a related line of business object named Books. The Classes DataContext object is queried by using the following LINQ query: var query = from class in Classes where class.Books.All(b => b.Price <= 50) select class;

You have to find out the result that will be returned from the query. What will be the result of the query?

Options:

A.

All books that have a price greater than or equal to 50.

B.

All books that have a price less than or equal to 50.

C.

All Classes that have the price of the related book greater than or equal to 50.

D.

All Classes that have the price of the related book less than or equal to 50.

Buy Now
Questions 45

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.

The application contains a Web page that will be accessible through the Internet. The Web page holds a Web form that captures data that will be stored in a SQL Server 2008 database. The form at present uses a POST method. The Web page also holds JavaScript validation routines. The validation routines will be used to ensure that the input to the form meets the business requirements and does not contain any code that is unsafe.

There is currently no server-side validation being performed. You are required to evaluate the application and resolve security flaws in the Web page. What will you do?

Options:

A.

Change the method of the form action to GET.

B.

Use Script Controls and Extenders.

C.

Create new server-side validation routines.

D.

Move the validation routines to a content page.

Buy Now
Questions 46

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. You are using regular expression in the application to validate email, phone number, etc. You are required to match the preceding character or sub expression zero or more times. Which of the following wildcard characters will you use to accomplish the task?

Options:

A.

?

B.

+

C.

*

D.

[n]

Buy Now
Questions 47

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

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

Options:

A.

BlueWell.Namespace1.Class1 : Alias1;

B.

BlueWell.Namespace1.Class1, Alias1;

C.

using Alias1 = BlueWell.Namespace1.Class1;

D.

Alias1 = BlueWell.Namespace1.Class1;

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 applications using .NET Framework 2.0. You want to allow users to view various details of a given unmanaged code. What will you do to accomplish the task?

Options:

A.

Use a COM/DCOM server.

B.

Use the Dispinterface.

C.

Use the Makecert.exe.

D.

Use the dumpbin.exe.

Buy Now
Questions 49

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 50

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 51

Which of the following is TRUE about a managed thread?

Options:

A.

It is a foreground thread.

B.

It is a managed assembly.

C.

It is either a background thread or a foreground thread.

D.

It is a background thread.

Buy Now
Questions 52

Kathy works as a Software Developer for BlueWell Inc. She creates a serviced component named

Com1. She wants to ensure that all the employees of the company are able to use Com1. Therefore, she wants to install Com1 in the Global Assembly Cache (GAC). Before the installation, she wants to register the serviced component manually with COM+. Which of the following tools will Kathy use to register Com1?

Options:

A.

Al.exe

B.

Regsvcs.exe

C.

Regasm.exe

D.

Mscorcfg.msc

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

<authentication mode="Windows"/>

<authorization>

</authorization>

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

Options:

A.

<authentication mode="Forms"/>

B.

C.

<authorization>

<allow users="?"/>

</authorization>

D.

<authorization>

<allow users="*"/>

</authorization>

Buy Now
Questions 54

You work as a .NET Trainer for ABC Inc. The Company uses .NET Framework as its application development platform. You are creating an application to demonstrate the use of datatypes. You create an unsigned Short datatype in the application. Which of the following values can be assigned to the unsigned Short datatype?

Each correct answer represents a complete solution. Choose three.

Options:

A.

123

B.

65,535

C.

127,625

D.

32,636

E.

-123

Buy Now
Questions 55

Maria works as a Software Developer for BlueWell Inc. She develops an application, named App1, using Visual C# .NET. App1 contains a Form control, named Form1, for collecting users' contact information. Form1 contains a TextBox control, named TextBox1. App1 requires users to enter data in TextBox1. Maria writes a method, named Method1, to validate the entered data. She adds an ErrorProvider control, named Control1, to Form1. Maria wants to ensure that App1 notifies the users if they enter invalid data in TextBox1. Which of the following code will she use to accomplish this?

Options:

A.

public void TextBox1_Validating(object sender, System.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.UpdateBinding();

}

}

B.

public void TextBox1_Validating(object sender, System.ComponentModel.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.SetError(TextBox1, "Invalid Email Entry.");

}

}

C.

public void TextBox1_Validated(object sender, System.ComponentModel.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.UpdateBinding();

}

}

D.

public void TextBox1_Validated(object sender, System.ComponentModel.CancelEventArgs e)

{

if(Method1() == false)

{

Control1.SetError(TextBox1, "Invalid Email Entry.");

}

}

Buy Now
Questions 56

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You are creating an ASP.NET Web application using .NET Framework 3.5. You need to implement a system to monitor Service Level Agreement (SLA) compliance in the application. You are required to make a method to enable precise calculation of the time taken by all requests to process. What will you do to accomplish this?

Options:

A.

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

B.

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

C.

Create and register a custom HttpHandler.

D.

Create and register a custom HttpModule.

Buy Now
Questions 57

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 58

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 59

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

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

Options:

A.

Rules

B.

Profiles

C.

bufferModes

D.

customErrors

E.

eventMappings

F.

Providers

Buy Now
Questions 60

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You are creating an application using the .NET Framework. The application contains a class named globalInfo. You need to serialize all public and nonpublic data of the globalInfo class to ensure that the class generates the minimum byte stream so that the minimum load is placed upon network resources. What will you do?

Options:

A.

Use the XmlSerializer class.

B.

Use the BinaryFormatter class.

C.

Use the SoapFormatter class.

D.

Use the IXmlSerializable interface.

Buy Now
Questions 61

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 62

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 63

Sam works as a Software Developer for GenTech Inc. He develops an application named App1 using Visual Basic .NET. App1 uses a non-COM DLL named Value1.dll, which contains unmanaged code. Sam writes a method named Method1 in Value1.dll as follows:

Method1 Lib "Value1.dll"(ByVal InputVar As String, ByRef WordsVar As String, ByRef

NumbersVar As Integer) As Integer

Sam wants to use Method1 for parsing a string into an array of string values and an array of integers. Sam wants to enable App1 to call this function. Which of the following statements about the method are true?

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

Options:

A.

The value of the first parameter cannot be changed by a procedure or a function.

B.

The second parameter will contain all string values found in the first parameter.

C.

The third parameter will contain all integer values found in the second parameter.

D.

The third parameter will contain all string values found in the second parameter.

Buy Now
Questions 64

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 65

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 66

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 67

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 68

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 69

You work as a Software Developer for ABC Inc. You develop a multi-threaded application named MyMultThreadApp using Visual Studio .NET. The application logs all warning and informational messages in an event log that keeps track of significant events when the application is running. The event log records information that might be useful for troubleshooting or performance analysis. Which of the following are the considerations that you must keep in mind when logging events with multithreaded components?

Each correct answer represents a complete solution. Choose three.

Options:

A.

An exclusive lock should be obtained on the log to avoid race conditions.

B.

Each shared component should be thread-safe when interacting with an event log.

C.

The System.Threading namespace should be used to record the identity of each thread for logging messages.

D.

The Debug and Trace classes should be used to log events.

Buy Now
Questions 70

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. You are using regular expression in the application to validate email, phone number, etc. You are required to match any single character except "\n". Which of the following wildcard characters will you use to accomplish the task?

Options:

A.

x/y

B.

+

C.

?

D.

.

Buy Now
Questions 71

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.

Matches

B.

Match

C.

IsMatch

D.

Equals

Buy Now
Questions 72

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You create a Windows application using .NET Framework 3.5. The application uses a SQL Server 2008 database on the network.

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

Options:

A.

Use the layered system constraint.

B.

Use the code on demand constraint.

C.

Use the client-server constraint.

D.

Use the stateless constraint.

E.

Use the cacheable constraint.

Buy Now
Questions 73

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

Options:

A.

Windows NT

B.

Secure Socket Layer

C.

Basic

D.

Single Sign-On

E.

Certificate Server

Buy Now
Exam Code: GSSP-NET-CSHARP
Exam Name: GIAC GIAC Secure Software Programmer - C#.NET
Last Update: Aug 14, 2025
Questions: 491

PDF + Testing Engine

$57.75  $164.99

Testing Engine

$43.75  $124.99
buy now GSSP-NET-CSHARP testing engine

PDF (Q&A)

$36.75  $104.99
buy now GSSP-NET-CSHARP pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 18 Aug 2025