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

Free and Premium GIAC GSSP-.NET Dumps Questions Answers

Page: 1 / 18
Total 491 questions

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

Question 1

Mark works as a Software Developer for GenTech Inc. He develops an application, named App1, using Visual Studio .NET. The application contains a Form control, named Form1, which enables users to edit information in a SQL Server database. Mark wants to save all the changes made by users in the database. He defines a boolean variable, named DataIsSaved, in the application code. DataIsSaved indicates whether or not all data are saved in the database. Mark wants to prevent Form1 from closing until all the changes are saved in the database. Which of the following code will he use to accomplish this?

Options:

A.

protected void Form1_Leave(object sender, System.ComponentModel.CancelEventArgs e) {

if(!DataIsSaved)

B.

Cancel = false;

else

C.

Cancel = true;

}

D.

protected void Form1_Leave(object sender, System.ComponentModel.CancelEventArgs e) {

if(!DataIsSaved)

E.

Cancel = true;

else

F.

Cancel = false;

}

G.

protected void Form1_Closed(object sender, System.ComponentModel.CancelEventArgs e) {

if(!DataIsSaved)

Buy Now
Question 2

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 have recently finished the development of an application using .NET Framework 2.0. The application can be used only for cryptography. Therefore, you have implemented the application on a computer. What will you call the computer that implemented cryptography?

Options:

A.

Cryptographic toolkit

B.

Cryptosystem

C.

Cryptographer

D.

Cryptanalyst

Question 3

Which of the following security methods is used when the code requires a specific set of permissions, which are not known until runtime?

Options:

A.

Role-Based Security

B.

Windows NT Security

C.

Imperative Security

D.

Declarative Security

Question 4

ECMAScript is supported in many applications and is commonly known as __________.

Options:

A.

VBScript

B.

AJAX

C.

JavaScript

D.

Script

Question 5

Andrew works as a Software Developer for Mansoft Inc. The company's network has a Web server that hosts the company's Web site. Andrew wants to enhance the security of the Web site by implementing Secure Sockets Layer (SSL). Which of the following types of encryption does SSL use?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Symmetric

B.

Secret

C.

IPSec

D.

Asymmetric

Question 6

Tony works as a Software Developer for TechNet Inc. He creates a satellite assembly named

SatAssembly1. He wants to install SatAssembly1 in the global assembly cache. Therefore, he compiles the assembly by using the Al.exe tool and signs SatAssembly1. Which of the following possible tools will Tony use to sign SatAssembly1?

Each correct answer represents a complete solution. Choose two.

Options:

A.

Installer tool

B.

File Signing tool

C.

.NET Services Installation tool

D.

Strong Name tool

Question 7

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 have recently finished the development of an application using .NET Framework 2.0. The application can be used only for cryptography. Therefore, you have implemented the application on a computer. What will you call the computer that implemented cryptography?

Options:

A.

Cryptographic toolkit

B.

Cryptosystem

C.

Cryptographer

D.

Cryptanalyst

Question 8

Allen works as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. He creates an application using .NET Framework. He wants to encrypt all his e-mails that he sends to anyone. Which of the following will he use to accomplish the task?

Options:

A.

PPP

B.

PPTP

C.

FTP

D.

PGP

Question 9

Patrick works as a Software Developer for GenTech Inc. He develops an application, named App1, using Visual C# .NET. He implements security using the security classes of the .NET Framework. He defines the following statements in the application:

PrincipalPermission Principal_Perm1 = new PrincipalPermission("Nick", "General

Manager");

PrincipalPermission Principal_Perm2 = new PrincipalPermission("Jack", "Accountant");

Patrick wants to check whether all demands that succeed for Principal_Perm1 also succeed for Principal_Perm2. Which of the following methods of the PrincipalPermission class will he use to accomplish this?

Options:

A.

Intersect

B.

IsSubSetOf

C.

IsUnrestricted

D.

Union

Question 10

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.

RangeValidator

B.

RequiredFieldValidator

C.

CustomValidator

D.

RegularExpressionValidator

Question 11

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 application using .NET Framework 3.5. The application represents a WCF service. The service will be consumed by clientside code that runs in the Web pages of an ASP.NET AJAX application. You must ensure that data serialization between the service and the application acquires least amount of latency. Which data format will you use to accomplish this?

Options:

A.

Extensible Application Markup Language

B.

JavaScript Object Notation

C.

Extensible Markup Language

D.

Really Simple Syndication

Question 12

Which of the following provide simplified access to ASP.NET AJAX login, roles, and profile services from Windows Forms and WPF applications?

Options:

A.

Entity Framework

B.

AJAX application services

C.

Client application services

D.

Sync Framework

Question 13

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

Question 14

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

Question 15

Which of the following options is not a primary objective of the WS-Security 1.1 specification?

Options:

A.

Integrity

B.

Confidentiality

C.

Authentication

D.

Validation

Question 16

You work as a Software Developer for ManSoft Inc. You use C# .NET to create an assembly named TestAssembly that will be used by other applications, including a standard COM client application. You must deploy the assembly on the COM application to a client computer. You must ensure that the COM applications can instantiate components within the assembly as COM components. Which of the following options will you use to accomplish this task?

Options:

A.

Generate a registry file for the assembly by using the Assembly Registration Tool (Regasm.exe) and register the file on the client computer.

B.

Deploy the assembly to the global assembly cache on the client computer.

Add a reference to the assembly in the COM client application.

C.

Create a strong name of the assembly by using the Strong Name tool(Sn.exe).

D.

Generate a type library for the assembly by using the Type Library Importer (Tlbimp.exe) and register the file on the client computer.

Question 17

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.

Question 18

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.

Question 19

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.

Question 20

You work as a Software Developer for Mansoft Inc. You create an application and use it to create code access security policies. Which of the following tools will you use to examine and modify code access security policies from a batch file?

Options:

A.

GacUtil.exe

B.

StoreAdm.exe

C.

Caspol.exe

D.

Tlbimp.exe

E.

Sn.exe

Question 21

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

Question 22

John works as a Web Developer for ABC Inc. He develops an ASP.NET application, named MyApp1, using Visual Studio .NET. The application will be used in the Sales department to generate monthly reports. John wants to deploy the application on the company's intranet. The company uses Microsoft Windows authentication. John wants to deny access to all the members of the Guest1 role. Which of the following attributes will he use in the <authorization> element of the application's Web.config file to accomplish the task?

Options:

A.

B.

C.

D.

Question 23

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.

Manhine.config

B.

Proxy auto-config

C.

ApplicationName.config

D.

Web.config

Question 24

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.

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

Question 29

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 will perform security related operations. You want to manage the role-based security in the application. What will you do to accomplish the task?

Options:

A.

Use the StackTrace property.

B.

Use the Process class.

C.

Use the WindowsIdentity class.

D.

Use the WindowsPrincipal class.

Question 30

Maria works as a Software Developer for ABC Inc. She develops a Console application using Visual Studio .NET 2005. She writes the following code in the application:

String st="Hello World";

int MyBegin=1;

int MyEnd=3;

Console.WriteLine(st.Substring(MyBegin, MyEnd));

What will happen when she tries to compile and execute the application?

Options:

A.

The application will compile successfully and display "el" as the output.

B.

The application will compile successfully and display "ell" as the output.

C.

A compile-time error will occur stating "No method matching substring(int, char) exists".

D.

The application will compile successfully and display "Hel" as the output.

Question 31

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

Question 32

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.

.

Question 33

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 has multiple threads that execute one after another. You want to ensure that the application terminates only when all the threads complete their tasks. Which of the following methods will you use to accomplish the task?

Options:

A.

Join

B.

Abort

C.

Sleep

D.

Suspend

Question 34

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

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

D.

CompareInfo cmp = CultureInfo.InvariantCulture.CompareInfo;

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

Question 35

You work as Enterprise Application Developer in SunInfo Inc. The company uses Microsoft .NET Framework 3.5. You design an application. You are required to execute queries against a collection and file directories. Which of the following data access technologies will you use to accomplish the task?

Options:

A.

LINQ to Objects

B.

LINQ to Data Services

C.

LINQ to XML

D.

LINQ to DataSets

Question 36

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

B.

Use the base keyword.

C.

Use the volatile keyword.

D.

Use the params keyword.

E.

Use the ref keyword.

Question 37

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

Question 38

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. The application contains a data-bound control. The user interface (UI) for modifying data from a LinqDataSource control is typically provided through the data-bound control. You are required to perform automatic data modifications. Which of the following conditions are required to enable automatic data modifications?

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

Options:

A.

The class that is assigned to the ContextTypeName property must derive from DataContext .

B.

The GroupBy property cannot be assigned a value.

C.

The property that is assigned to the TableName property must derive from Table(TEntity).

D.

The Where property cannot be assigned a value.

E.

The Select property cannot be assigned a value.

Question 39

You work as a Software Developer for ManSoft Inc. You create an application using Visual Studio .NET 2005. You are using the Custom authentication provider in the application. In order to enable the Custom authentication provider, you have to make an entry in the Web.config file for the application. Which of the following entries will you use to accomplish the task?

Options:

A.

B.

C.

D.

E.

Question 40

Allen works as a Software Developer for Mansoft Inc. He develops a Web application using Visual Studio .NET. He adds a Web reference to an XML Web service named MyWebService in the application. MyWebService includes a method named MyMethod, which takes user identification number as a parameter and returns a DataSet object containing user information. The System.ArgumentException is thrown if the user identification number does not lie between 1 and 500. Allen writes a try and catch block to capture the exception thrown by the Web service. Which of the following exceptions will the try and catch block catch if a user calls MyMethod passing 501 as a parameter?

Options:

A.

System.Web.Services.Protocols.SoapException

B.

System.Web.Services.Protocols.SoapHeaderException

C.

System.ApplicationException

D.

System.ArgumentNullException

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

Question 42

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 the .NET Framework.

The application uses a MS SQL server database. The application creates and manages online advertising campaigns. You need the Web application to track the effectiveness of the forthcoming campaigns by evaluating advertising results with operation parameters. This necessitates adding a Web form that executes the following tasks:

l It uses a target URL for all online advertising.

l It logs the referrer URLs.

l It offers live reporting of referral data.

You are required to find out the most effective storage mechanism to log the referral data. What will you do?

Options:

A.

Use an application log.

B.

Use a standalone application file.

C.

Use HTTP modules

D.

Use a database.

E.

Use a text file.

Question 43

Rick works as a Software Developer for GenTech Inc. He develops an application named App1 by using C# .NET. App1 uses a Microsoft SQL Server database named Database1. Database1 contains a table named Table1. Table1 stores data entered through App1. Rick wants App1 to notify every fifteen minutes about the new data entered. He wants to develop another application named App2, which reads Table1 every fifteen minutes and sends new data to the concerned department of the company.

App2 will run on a computer that is used by several users who continuously log on and log off from the network to perform miscellaneous tasks. Which of the following .NET application types will Rick use to accomplish the task?

Options:

A.

Windows service

B.

Windows Form

C.

.NET remote object

D.

XML Web service

Question 44

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

Question 45

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.

Question 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 a .NET remoting application using .NET Framework

2.0. You want to use a remote object whose lifetime is controlled by a server and the remote object is created for each client request. Which of the following objects will you use to accomplish the task?

Options:

A.

Client activated

B.

MarshalByRefObject

C.

Server activated Singleton

D.

Server activated SingleCall

Question 47

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.

Question 48

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;

Question 49

You work as a Software Developer for Mansoft Inc. You create an application and use it to create users as members of the local Users group. Which of the following code snippets imperatively demands that the current user is a member of the local Users group?

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

Options:

A.

System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

PrincipalPermission MyPermission = new PrincipalPermission(null, @"BUILTIN\Users", true);

MyPermission.Demand();

B.

PrincipalPermission MyPermission = new PrincipalPermission(null, @"BUILTIN\Users", true); MyPermission.Demand();

C.

System.AppDomain.CurrentDomain.SetPrincipalPolicy(PrincipalPolicy.WindowsPrincipal);

PrincipalPermission MyPermission = new PrincipalPermission(null, @"Users", true);

MyPermission.Demand();

D.

PrincipalPermission MyPermission = new PrincipalPermission(null, @"Users", true);

MyPermission.Demand();

Question 50

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 named StringRW using .NET Framework. You store some characters into an array of Unicode characters. You need to write all or some of these characters into a String object. Which of the following code segments will you choose to accomplish this task?

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

Options:

A.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

StringWriter sw = new StringWriter(sb);

Object obj=(Object)b;

sw.Write(obj);

Console.WriteLine(sb);

sw.Close();

B.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

StringWriter sw = new StringWriter(sb);

sw.Write(b);

Console.WriteLine(sb);

sw.Close();

C.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

string str=new string(b);

StringWriter sw = new StringWriter(sb);

sw.Write(str);

Console.WriteLine(sb);

sw.Close();

D.

StringBuilder sb = new StringBuilder("This is my character String Builder");

char[] b = { 'c', 'l', 'a', 's', 's', 'r', 'i', 'g', 'h', 't', 'd', 'o', 'd' };

StringWriter sw = new StringWriter(sb);

sw.Write(b, 0, 5);

Console.WriteLine(sb);

sw.Close();

Question 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 application uses the health monitoring events to raise application audit events in the following situations:

l When users login

l When users modify their password

l When users perform other security-related actions

You must ensure that the application logs all audit events for all applications on the Web server.

What will you do?

Options:

A.

Configure the eventMappings Element in the Web.config file to allow an entry for success a udits.

B.

Configure the eventMappings Element in the Web.config file to allow a single entry for auditing events that is present for all audits.

C.

Configure the eventMappings Element in the Machine.config file to allow an entry for success audits.

D.

Configure the eventMappings Element in the Machine.config file to allow a single entry for auditing events that is present for all audits.

Question 52

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

Question 53

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.

Question 54

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You create an application using .NET Framework. The application is using an assembly. You want to ensure that the application provides the best performance. Security is not a consideration. Which of the following permission sets will you use to accomplish the task?

Options:

A.

Everything

B.

FullTrust

C.

Nothing

D.

Execution

E.

LocalIntranet

F.

Internet

Question 55

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.

Question 56

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 that will manage rental properties for a property management agency. When a property is rented, a lease agreement is created. At that time a new lease is entered into the application, the starting date of the lease may not yet be known.

You need to write code that stores the lease start date entered by a user in a variable. The variable that stores the lease start date should contain no value, by default. If no lease start date is entered, the variable should have no value assigned to it.

Which code segment should you choose?

Options:

A.

DateTime? leaseStartDate = null;

B.

DateTime leaseStartDate = null;

C.

DateTime? leaseStartDate = new DateTime();

D.

DateTime leaseStartDate = new DateTime();

Question 57

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You create a Windows service application using the .NET Framework. You are required to synchronize execution of some resources across multiple processes.

What will you do to accomplish this task?

Options:

A.

Use the Mutex class.

B.

Use the Monitor class.

C.

Use the ThreadPool class.

D.

Use the Interlocked class.

Question 58

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 for a Bank using the .NET Framework. You create a method that gets the images of cancelled checks and displays them. You presently have access to a method that reads the images from a SQL server database as a sequence of bytes. You need to transfer the image from the SQL server database to a form with the least amount of temporary buffers and files. Which of the following classes will you use to accomplish this task?

Options:

A.

FileStream

B.

NetworkStream

C.

BufferedStream

D.

MemoryStream

Question 59

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create an ASP.NET AJAX application using .NET Framework 3.5. You have enabled debugging in your application to get error information. Now, you want to deploy the release version of the application. How will you set the application to release mode?

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

Options:

A.

Set the debug attribute of the @Page directive to false.

B.

Set the ScriptMode property of the ScriptManager control to Debug in pages that contain a ScriptManager control.

C.

In the Web.config file, set the compilation element's debug attribute to false.

D.

Set the ScriptMode property of the ScriptManager control to Release in pages that contain a ScriptManager control.

Question 60

John works as a Software Developer for CyberOrbit Inc. He develops an application, named App1, using Visual C# .NET. He implements security by using the security classes of the .NET Framework. In the application code, he uses the following statements to create two PrincipalPermission objects representing two different administrative users:

PrincipalPermission Perm1 = new PrincipalPermission("Mark", "Manager");

PrincipalPermission Perm2 = new PrincipalPermission("Davis", "Manager");

John wants to create a new PrincipalPermission object by combining these two objects and use the new object to make a demand. He wants the demand to succeed only if the current principal object represents either Mark or Davis in the role of Manager. Which of the following methods will he use to create the new permission?

Options:

A.

Intersect

B.

Copy

C.

IsSubSetOf

D.

Union

Question 61

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 that reads data from and writes data to a file using the .NET Framework 2.0. You want to restrict users to read characters from a byte stream and write characters to a stream. Which of the following classes will you use to accomplish the task?

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

Options:

A.

StringReader

B.

StringWriter

C.

StreamReader

D.

StreamWriter

Question 62

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 create a HTTP module that is called on each and every request made by the application. It is called as part of the ASP.NET request pipeline. Other then this, under which of the following operations will you use the HTTP module?

Each correct answer represents a complete solution. Choose three.

Options:

A.

Custom headers or footers

B.

Image server

C.

Security

D.

Statistics and logging

Question 63

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.

Question 64

You work as a Software Developer for SunSoft Inc. The company uses Visual Studio .NET 2005 as its application development platform. You use .NET Framework 2.0 to create several Windows applications. All applications use a common class library assembly named Customers. You deploy the application to the client computers on your company's intranet. Later, you modify the assembly. Any application that uses version 1.0.0.0 must now use version 2.0.0.0. Which of the following options will you use to accomplish the task?

Options:

A.

Modify the Publisher Policy file containing a reference to Customers.

B.

Modify the application configuration file for Customers.

C.

Modify the reference path for Customers.

D.

Modify the machine configuration file on your client computers.

Question 65

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

Question 66

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.

Question 67

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 have received a file in ASCII encoded from one of the company's branch. Therefore, you are required to decode the file encoded in ACSII. Which of the following decoding types will you use to get the correct results?

Each correct answer represents a complete solution. Choose two.

Options:

A.

UTF-32

B.

UTF-16

C.

UTF-7

D.

UTF-8

Question 68

Sam works as a Software Developer for GenTech Inc. He develops an ASP.NET application, named App1, using Visual Studio .NET. App1 is used within the company's intranet. Employees use Internet Explorer on the intranet. Sam creates a page named Page1.aspx. Sam wants the page to be redirected to the home page if an error occurs. Which of the following attributes of the @ Page directive will he use to accomplish the task?

Options:

A.

MasterPageFile

B.

CodePage

C.

PageError

D.

ErrorPage

Question 69

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET 2008 as its application development platform. You have recently finished development of a Windows Forms application using .NET Framework 3.5. You have written complex foreach loops to retrieve data from collections. However, you want to modify the application, so that it uses LINQ queries in place of foreach loops. What will be the advantages of using LINQ queries instead of foreach loops?

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

Options:

A.

They provide powerful filtering, ordering, and grouping capabilities with least application co de.

B.

They can be ported to other data sources with slight or no alteration.

C.

They provide lambda expression in the form of an expression tree.

D.

They are more concise and readable, particularly when filtering multiple conditions.

Question 70

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET as its application development platform. You create an application using .NET Framework. The application is used to place an assembly on the intranet. Which of the following classes will you use to test whether or not an assembly was located on the intranet?

Options:

A.

GacMembershipCondition

B.

PublisherMembershipCondition

C.

UrlMembershipCondition

D.

ZoneMembershipCondition

E.

SiteMembershipCondition

Question 71

You work as a Software Developer for Mansoft Inc. You create an application using Visual Studio .NET 2005. You write code in the application and execute it, but it caused an error. Now, you want to find out the reason that has thrown the exception. Which of the following properties will you use to accomplish this task?

Options:

A.

Source

B.

StackTrace

C.

Message

D.

Data

E.

TraceSwitch

Question 72

You work as a .NET Trainer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are required to identify the building blocks of .NET Framework. Which of the following building blocks will you choose to accomplish the task?

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

Options:

A.

Common Language Runtime (CLR)

B.

Common Type System (CTS)

C.

.NET Server Infrastructure

D.

Common Language Specification (CLS)

E.

Microsoft Intermediate Language (MSIL)

Page: 1 / 18
Total 491 questions