GIAC GSSP-NET-CSHARP - GIAC GIAC Secure Software Programmer - C#.NET Exam
Page: 2 / 99
Total 491 questions
Question #6 (Topic: Topic 1)
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?
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?
A. permission.PermitOnly();
B. CodeAccessPermission.RevertDeny();
C. permission.Deny();
D. CodeAccessPermission.RevertAssert();
E. permission.Demand();
Answer: D
Question #7 (Topic: Topic 1)
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?
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?
A. Forms-based authentication
B. Integrated Microsoft Windows authentication
C. Basic authentication
D. Digest authentication
Answer: A
Question #8 (Topic: Topic 1)
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?
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?
A. False False False
B. False True False
C. True True True
D. True False True
Answer: D
Question #9 (Topic: Topic 1)
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. You want to use a HTTP module called on each and every
request made by the application. It is called as part of the ASP.NET request pipeline. It has
right to access life-cycle events throughout the request. You also want to ensure that the
HTTP module allows a user to inspect incoming and outgoing requests and take
appropriate action based on the request. What will be the correct order to create the HTTP
module?
2008 as its application development platform. You create an ASP.NET Web application
using the .NET Framework 3.5. You want to use a HTTP module called on each and every
request made by the application. It is called as part of the ASP.NET request pipeline. It has
right to access life-cycle events throughout the request. You also want to ensure that the
HTTP module allows a user to inspect incoming and outgoing requests and take
appropriate action based on the request. What will be the correct order to create the HTTP
module?
A.
Answer: A
Question #10 (Topic: Topic 1)
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?
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?
A. <customErrors mode="On" defaultRedirect="Error.htm"> <error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
B. <customErrors mode="Off"> <error statusCode="400" redirect="Error.htm"/> <error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
C. <customErrors mode="On"> <error statusCode="400" redirect="Error.htm"/> <error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
D. <customErrors mode="Off" defaultRedirect="Error.htm"> <error statusCode="404" redirect="PageNotFound.htm"/> </customErrors>
Answer: A