Pass the GIAC GIAC Certification GSSP-NET-CSHARP Questions and answers with CertsForce

Viewing page 5 out of 15 pages
Viewing questions 41-50 out of questions
Questions # 41:

You work as a Software Developer for ABC Inc. You have created a console application that uses two threads, named thread1 and thread2. You need to modify the code to prevent the execution of thread1 until thread2 completes its execution. Which of the following steps will you take to accomplish this task?

Options:

A.

Call the SpinWait() method of thread1.


B.

Use a WaitCallBack delegate to synchronize the threads.


C.

Call the sleep() method of thread1.


D.

Configure thread1 to run at a lower priority.


E.

Configure thread2 to run at a higher priority.


Questions # 42:

You are working on an ASP.NET application that will handle shopping cart for online users. You wish to generate images of all your company's products dynamically on one of the application's Web pages. You need to modify your configuration settings file for this purpose. Which of the following sections of the configuration file will you use to accomplish the task?

Options:

A.


B.


C.


D.


Questions # 43:

You work as a Windows Application Developer for ABC Inc. The company uses Visual Studio .NET as its application development platform. You create a Windows application using the .NET Framework. You create a database to maintain the record of the students. You create a table named Student. You want to retrieve names and roll number of those students whose age is less than ten years. An instance of the SqlCommand class named StudentCommand is already created. Which of the following code segments should you use to execute the query?

Options:

A.

StudentCommand.CommandType = CommandType.StoredProcedure;

StudentCommand.CommandText = "SELECT Name, Roll number FROM Student WHERE Age <

10";


B.

StudentCommand.CommandType = CommandType.StoredProcedure;

StudentCommand.CommandText = "Name and Roll number of students less than ten years";


C.

StudentCommand.CommandType = CommandType.Text;

StudentCommand.CommandText = "SELECT Name, Roll number FROM Student WHERE Age <

10";


D.

StudentCommand.CommandText = CommandText.Text;

StudentCommand.CommandType = "SELECT Name, Roll number FROM Student WHERE Age <

10";


Questions # 44:

You work as a Web Application Developer for SunInfo Inc. The company uses Visual Studio 2008 as its application development platform. You create a Web application using .NET Framework 3.5. You want to implement state management in your application. In which of the following stages of the application life cycle will your application actually start?

Options:

A.

On creation of an instance of the HttpApplication class


B.

When an instance of the ApplicationManager class is created


C.

When instances of the core objects such as HTTPContext, HTTPRequest, and HTTPResponse are created


D.

When a user first makes a request for a page in your Web site


Questions # 45:

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.


Questions # 46:

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.


Questions # 47:

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


Questions # 48:

Ryan works as a Software Developer for Mansoft Inc. He creates an ASP.NET Web application named MyWebApplication using Visual Studio .NET 2005. MyWebApplication performs validation on XML files in a directory. Whenever a new XML file appears in the directory, MyWebApplication opens the file, checks it for validation, and updates it accordingly. Ryan wants to ensure that each update performed on XML files is logged in the Web application log. He creates a String object named Var1, to store the message to be logged. Which of the following will he use to accomplish the task?

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

Options:

A.

The EventLog.Source property


B.

The EventLog.WriteEntry method


C.

The Trace.WriteLine method


D.

The EventLog.EventLogSource property


Questions # 49:

David works as a Software Developer for GenTech Inc. He defines an interface, named Interface1.

Interface1 contains the following code:

public interface Interface1

{

// Code goes here.

}

David creates a serviced component, named Component1, which implements Interface1. Which of the following code will he add to Component1 to ensure that it is built properly?

Options:

A.

[ClassInterface(ClassInterfaceType.AutoDual)]

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}


B.

[GuidAttribute("9ED54F84-A89D-4fcd-A854-44251E925F09")]

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}


C.

[ClassInterface(ClassInterfaceType.AutoDispatch)]

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}


D.

public class Component1 : ServicedComponent, Interface1

{

// Code goes here.

}


Questions # 50:

Charles works as a Web Developer for Cyber Net Inc. The company frequently receives production information from external vendors in the form of XML data. Charles stores these XML data in a disk container of the Web server as .xsd schema files and .xdr schema files. There are specific rules for writing XML codes to define the structure and data types for XML documents. Which of the following criteria should NOT be considered while writing an XML document?

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

Options:

A.

A well-formed XML document should contain a start tag but not necessarily an end tag.


B.

An XML document must enclose the beginning and ending points of a tag by using the symbols '<' and '>' respectively.


C.

A well-formed XML document should contain a start tag and an end tag.


D.

An XML document should be specified according to the application or business requirement s.


E.

An XML document should have predefined elements and attributes.


Viewing page 5 out of 15 pages
Viewing questions 41-50 out of questions