Debug and Security Flashcards

1
Q

What object is required when invoking either the Write

or Read methods of the CryptoStream class?

A

A byte array is required.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
Which switch class should you instantiate for a simple
on/off switch?
A

the BooleanSwitch class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which encryption type uses a value table to convert
data of any length to a fixed-length byte sequence to
provide data confidentiality and integrity?

A

hash encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
Which method of the CryptoStream class should you
invoke to decrypt data?
A

the Read method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which two classes represent the hashing algorithms
Message Digest 5 (MD5) and Secure Hash Algorithm
(SHA)-245, respectively?

A

the MD5CryptoServiceProvider and

SHA245Managed classes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which assembly attribute should you apply to indicate
the keys used when compiling a strong-named
assembly?

A

the AssemblyKeyFile attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What provides isolation and security for an

application?

A

the application domain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which tool should you use to encrypt the

connectionStrings section of a Web.config file?

A

the ASP.NET IIS Registration (Aspnet_regiis.exe)

tool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
Which method of the CryptoStream class should you
invoke to encrypt data?
A

the Write method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
Which method of the Stopwatch class pauses
measurement of the time interval?
A

the Stop method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
Which method of the SiteMembershipCondition class determines whether an assembly belongs to a
site based upon the specified evidence?
A

the Check method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which attribute should you apply to a parameter or
return type to force marshaling into a specific COM
data type?

A

the MarshalAs attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q
Which class uses an asymmetric algorithm that
supports up to 1,024-bit keys?
A

the DSACryptoServiceProvider class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q
Which attribute should you add to a custom installer
class to ensure it will be invoked?
A

the RunInstaller attribute

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q
Which method of the EventLog class should you
invoke to write an event log?
A

the WriteEntry method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q
Which key property of the HMAC class is not in the
HashAlgorithm class?
A

the Key property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q
Which class represents a hash algorithm used strictly
for data integrity?
A

the MD5 class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q
Which method must a class implement to be used as a
key for an item in a Hashtable collection?
A

the GetHashCode method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q
Which property of the Process class returns the name
of the computer on which the process is running?
A

the MachineName property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q
Which property of the EventLog class indicates the
event origin of a log?
A

the Source property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

What is reflection?

A

A way to explore loaded assemblies and the types

defined within them at runtime.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q
Which method of the Stopwatch class sets the
elapsed time to zero and begins measurement of a
new time interval?
A

the Restart method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which encryption type uses a single key to encrypt

and decrypt data to provide data confidentiality?

A

symmetric encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which property of the AppDomain class should you
use to retrieve or set the probing location for private
assemblies?

A

the RelativeSearchPath property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

Which command-line tool allows users to modify
security permissions, permission sets, and code
groups for an assembly?

A

the caspol.exe tool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q
Which class is used to verify whether an assembly
belongs to a code group based upon the website from
which it originates?
A

the SiteMembershipCondition class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

Which encryption type uses fixed size blocks and
iterations to provide data confidentiality with the best
overall performance?

A

symmetric encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

Which method of the Assembly class should you
invoke to retrieve the assembly instance that invoked
the currently executing code?

A

the GetCallingAssembly method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

Which encryption type provides higher security than
symmetric encryption, but also uses a fixed buffer
size, a larger range of key values, and more timeconsuming algorithms?

A

asymmetric encryption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

Which property of the ServiceSecurityAuditBehavior
class sets the specific Event Log for audit messages,
specifically Application or Security?

A

the AuditLogLocation property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q
Which class uses an asymmetric algorithm that
supports up to 16,384-bit keys?
A

the RSACryptoServiceProvider class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q
Which class should you use to create the new
performance counters?
A

the PerformanceCounterCategory class

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

Which value of the TraceLevel enumeration will only

trace error and warning messages?

A

the Warning (2) value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
34
Q

Which method of the Process class should you invoke
to retrieve all processes running on the local
computer?

A

the GetProcesses method

35
Q
Which property of the EventLog class indicates the
section of a log?
A

the Log property

36
Q

Which assembly attribute should you apply to indicate

the versioning of strong-named assembly?

A

the AssemblyVersion attribute

37
Q
Which property of the TraceSwitch class will retrieve
the value of the TraceLevel enumeration?
A

the Level property

38
Q

Which method of the Process class should you invoke
to retrieve all processes associated with a given
resource?

A

the GetProcessById method

39
Q
Which method of the AppDomain class should you
use to load an assembly into an application domain?
A

the Load method

40
Q
Which class should you use to retrieve or set the value
of a performance counter?
A

the PerformanceCounter class

41
Q
Which method of the EventLog class should you
invoke to drop an event log source?
A

the DeleteEventSource method

42
Q
Which class represents hashing algorithms used to
sign data with digital signatures?
A

the HMAC class

43
Q

Which OData query option indicates whether the payload format is Atom or JSON?

A

the $format parameter

44
Q
Which method of the Stopwatch class begins or
resumes measurement of the time interval?
A

the Start method

45
Q

Which encryption type protects data from unauthorized
access and tampering by using a fixed-length byte
sequence?

A

hash encryption

46
Q

Which two ADO.NET performance counters indicate
the rate of actual connections opened and closed on
the database server?

A

HardConnectsPerSecond and

HardDisconnectsPerSecond

47
Q

Which element should you use to force an older client

to use the newer version of an assembly?

A

the bindingRedirect element

48
Q
Which class should you use to place log entries
viewable through the EventViewer tool?
A

the EventLog class

49
Q

Which property of the ServiceSecurityAuditBehavior
class sets how authentication-related events are
audited, including message tampering and expiration
in addition to client authentication?

A

the MessageAuthenticationAuditLevel property

50
Q

Which statement should you execute to grant full trust
on the machine policy to the assembly.exe
assembly?

A

caspol -machine -addfulltrust

assembly.exe

51
Q
Which method of the HashAlgorithm class creates
hashed data?
A

the ComputeHash method

52
Q

Which class should you use when
encrypting/decrypting data with managed symmetric or
asymmetric cryptographic providers?

A

the CryptoStream class

53
Q

Which two classes represent the asymmetric
algorithms Digital Signature Algorithm (DSA) and
RSA, respectively?

A

the DSACryptoServiceProvider and

RSACryptoServiceProvider classes

54
Q

What is the term for a random number that adds
complexity when it is appended to a value before a
hash is applied?

A

salt

55
Q

Which ADO.NET performance counters indicate the
total number of connection pools and connection pool
groups that are unused and marked for disposal?

A

NumberOfInactiveConnectionPools and

NumberOfInactiveConnectionPoolGroups

56
Q
Which class represents specific managed instances
available through Windows Management
Instrumentation (WMI)?
A

the ManagementObject class

57
Q

Which ADO.NET performance counters indicate the
total number of connections, including both in and not
in a connection pool?

A

NumberOfPooledConnections and

NumberOfNonPooledConnections

58
Q

Which element in the application configuration

specifies alternate locations for private assemblies?

A

the probing element

59
Q

Which element in the application configuration file
specifies the version and location of a dependent
assembly?

A

the codeBase element

60
Q
Which method of the Debug class should you invoke
to enter break mode when an expression is false?
A

the Assert method

61
Q

Which method of the Assembly class should you
invoke to retrieve the assembly instance where the
current code is located?

A

the GetExecutingAssembly method

62
Q

Which three methods of the PerformanceCounter
class should you use to increase or decrease a
performance counter’s value?

A

the Increment, Decrement, and IncrementBy

methods

63
Q

Which method of the Process class should you invoke
to retrieve all processes associated with a given
resource?

A

the GetProcessById method

64
Q
Which method of the Stopwatch class sets the
elapsed time to zero?
A

the Reset method

65
Q

In which configuration file should you specify the

developmentMode element?

A

the machine.config file

66
Q

Which element in the application configuration file
should you use to specify BooleanSwitch or
TraceSwitch objects?

A

the switches element

67
Q

Which three HTTP operations can be tunneled the
POST method by specifying the operation in the
header X-HTTP-Method?

A

the DELETE, PUT, and MERGE operations

68
Q

Which encryption type uses a private/public key pair to
encrypt and decrypt data to provide both data
confidentiality and authentication?

A

asymmetric encryption

69
Q

Which class represents a dynamic assembly and
contains methods to save and run an assembly at
runtime?

A

the AssemblyBuilder class

70
Q
Which property of the CorrelationManager class used
to set or get the identity of a logical transaction?
A

the ActivityId property

71
Q

Which three classes represent the block cipher
algorithms Data Encryption Standard (DES),
TripleDES, and Advanced Encryption Standard (AES),
respectively?

A

the DESCryptoServiceProvider,
TripleDESCryptoServiceProvider, and
AesManaged classes

72
Q
Which class is required to establish a TCP connection
using Secure Sockets Layer (SSL)?
A

the X509Certificate class

73
Q

Which element in the application configuration file

redirects one assembly version to another version?

A

the bindingRedirect element

74
Q

Which method of the AppDomain class should you invoke to emit dynamically an assembly at runtime?

A

the DefineDynamicAssembly method

75
Q

Which ADO.NET performance counters indicate the
total number of connections that are either in a wait
state or actively reclaimed by the garbage collector?

A

NumberOfStasisConnections and

NumberOfReclaimedConnections

76
Q
Which class uses a symmetric algorithm that only
supports 64-bit keys?
A

the DESCryptoServiceProvider class

77
Q

Which property of the ServiceSecurityAuditBehavior
class sets how authorization-related events are
audited, including client identity when accessing
external resources?

A

the ServiceAuthorizationAuditLevel property

78
Q
Which class is used to generate a random number for
additional security in hash encryption?
A

the RNGCryptoServiceProvider class

79
Q

What is the hash size for the MD5 algorithm?

A

128 bits

80
Q
Which method of the EventLog class should you
invoke to create a new event log?
A

the CreateEventSource method

81
Q
Which method of the AppDomain class will create an
application domain?
A

the CreateDomain method

82
Q
Which method of the Debug class will emit an error
message only in the debugger?
A

the Fail method

83
Q

Which standard protocol uses encryption and data
certificates to guarantee authentication and
confidentiality and to prevent tampering of transmitted
data between a client and server over HTTP?

A

Secure Sockets Layer (SSL)

84
Q
Which class should you use to launch an application
without specifying arguments on the command line?
A

the Process class