145795 12815 mahendercap by XZX8QW

VIEWS: 19 PAGES: 12

									Question 1: Which of the following are provided by the .NET Framework for handling events?
A. The System.Observer class.
B. The System.Delegate class.
C. The System.Event class.
D. System.EventHandling namespace.
E. The System.Callback class.


Question 2: Which of the following statements concerning strong-named assemblies are true?
A. An assembly can be signed with a strong-name by using the Assembly Linker (al.exe) program.
B. Strong-named assemblies can only reference other strong-named assemblies.
C. An assembly can be signed with a strong-name by using the 'SignStrongName' attribute.
D. An assembly with a name of over 32 characters will automatically have a strong-name.
E. Strong names guarantee name uniqueness.


Question 3: A programmer is developing a Web based solution, which uses XML extensively. Which of
the following new XML features, introduced by SQL Server 2000, support the XML needs of the
programmer?
 A. Specifying XPath queries against XML-Data schemas
 B. Ability to access XML data through URLs
 C. XML domain instantiation
 D. XSLT support for XML files
 E. Usage of XML files in stored procedures

Question 4: A programmer has written a script to remove all the rows in a table using the TRUNCATE
TABLE command and has also created a trigger to display a message when the transaction is complete.
When the script is executed, SQL Server 2000 does not display the message, but the rows are deleted
from the table. Which of the following statements accurately describe the cause of this result?
 A. The table is not owned by the owner of the trigger.
 B. The TRUNCATE TABLE statement is not logged, hence the trigger is not executed.
 C. The action for the trigger is not specified.
 D. An error occurred after the table was truncated.
 E. The trigger is created on a temporary table.

Question 5: Which of the following features are not provided by Application Domains?
A. Objects in different Application Domains can communicate directly with each other.
B. Application domains form a security boundary for managed code.
C. They allow several assemblies to run in a single process without allowing access to each other's data.
D. Each Application Domain corresponds to a single thread.
E. The Application Domain provides configuration settings such as application version policies.

Question 6: Which of the following statements accurately describe the results of executing the SQL
Server 2000 stored procedure below?

sp_addlinkedsrvlogin 'location_server',
  false,
 'Place1\user100',
 'sa', NULL
A. user100 login is mapped to sa login.
B. user100 login is deleted from the system admin group.
C. user100 login is mapped to the system managers group.
D. user100 login is removed from the built-in administrators group.
E. user100 login is denied access to location_server.

Question 7: When an ADO.NET DataSet is populated from an XML File, all columns of all DataTables are
converted to type System.String since type information is not available in the DataSet. Which of the
following are possible solutions for this?
 A. Ensure that the DataSet is a Typed DataSet by creating DataTables that have data types exclusively
provided for each column.
 B. Debugging and project state information for incremental linking of the debug configuration of the
program
 C. Check if data in the DataSet is loaded from an RDBMS such as Microsoft SQL Server since datatypes
other than string are supported only for RDBMS data.
 D. Load the schema using DataSet.ReadXMLSchema and then populate the data.
 E. After the data has been populated use the Convert class to convert to the appropriate data

Question 8: Which of the following mechanisms allow meta-data to be read at runtime?
A. The System.MetaDataViewer class.
B. The System.Introspection namespace.
C. The System.Attribute class.
D. The System.Reflection namespace.
E. The System.Runtime namespace

Question 9: Which of the following limits can be directly controlled with attribute parameters when
creating a class that uses Object Pooling?
 A. The number of threads used by the object pool.
 B. The number of Application Domains accessing the object pool.
 C. The amount of memory used by the object pool.
 D. The number of objects existing in the object pool.
 E. The number of database connections used by the object pool.

Question 10: Which of the following are features of ASP.NET session state?
A. Process dependent
B. Cookie independent
C. Cookie dependent
D. Process independent
E. Support for server farm configurations

Question 11: Which of the following statements accurately describe a benefit of an Extended Stored
Procedure (ESP) in SQL Server 2000?
 A. An ESP allows a user to create external routines in a programming language such as C.
 B. An ESP will never produce memory leaks or other problems that reduce the performance and
reliability of the server.
 C. An ESP does not run directly in the address space of SQL Server 2000.
D. An ESP is a Dynamic Link Library that SQL Server 2000 can dynamically load and execute.
E. An ESP is programmed using the SQL Server Open Data Services API.

Question 12: Which of the following special tags control how settings apply to a directory in an ASP.NET
application?
A. <httpRuntime>
B. <identity>
C. <location>
D. <httpModules>
E. <appSettings>

Question 13: Which of the following methods are not supported by SQL Server 2000 Dynamic cursors?
A. FETCH FIRST
B. FETCH LAST
C. FETCH RELATIVE
D. FETCH ABSOLUTE
E. FETCH PRIOR

Question 14: Which of the following statements about exposing assemblies to COM applications are
true?
 A. Protected methods and properties are visible to COM applications.
 B. Classes must have a public default constructor to be activated from COM.
 C. Assemblies containing inheritance cannot be exposed to COM applications.
 D. .NET assemblies must be installed within a COM+ application to be accessible from COM.
 E. Only Assemblies with strong names can be exposed to COM applications.

Question 15: Which of the following statements about serializing an object to XML are false?
A. All private properties and fields are serialized.
B. The format of the generated XML can be controlled using the XmlElement attribute.
C. All public, non-static properties and fields are serialized.
D. Serializing to XML is handled by the XmlSerializer class.
E. De-serializing from XML is handled by the XmlSerializer class.

Question 16: An ASP.NET Web form contains functionality to display data from a SQL Server 2000
Database. Which of the following methods can be used to convert this page into a user control?
 A. Save the .aspx as an .ascx file in Microsoft Visual Studio.NET.
 B. Create a new user control that inherits from the .aspx Web form. Override the behaviour of the
appropriate events and properties to be custom coded.
 C. Include a code declaration block in the user control that contains event-handling code for the Web
form. Declare the user control in the Web forms pages where the user control must appear.
 D. Remove all <html>, <body>, and <form> elements from the page. Change the @ Page directive in the
Web forms page to an @ Control directive. Include a className attribute in the @Control directive.
Change the file name extension from .aspx to .ascx.
 E. Declare an @ Register directive. Include a tagprefix, tagname and src attribute. Save the file with an
.ascx extension.

Question 17: Which of the following accurately describe the sentence below?
The ASP.NET security system protects non-ASP.NET resources.
A. The statement is true. The security settings are provided in the global.asax file.
B. The statement is true. The security settings are provided in the web.config file.
C. The statement is false. Resources such as .txt, .htm, .jpg, and .gif, which are not associated with
ASP.NET, are not protected by security settings in the web.config file.
D. The statement is true. The security settings are provided in the global.asa file.
E. The statement is false. Resources such as .txt, .htm, .jpg, and .gif, which are not associated with
ASP.NET, are not protected by security settings in the global.asax file.

Question 18: There is an ASP.NET WebService, which returns XML Data that contains records of Products
with fields ProductID, Description and Quantity. Into which of the following classes can this information
be collected for using in a Windows form client?
A. TextReader
B. XmlTextReader
C. DataSet
D. SqlDataReader
E. XmlReader


Question 19: Which of the following security types can be used by ASP.NET WebServices?
A. Forms authentication
B. Windows authentication
C. Passport authentication
D. WS-security
E. Cookie-based security

Question 20: If a request contains additional content, such as querystring or form variables, which of the
following events are fired immediately before that content is received?
 A. PreSendRequestContent
 B. ReleaseRequestState
 C. PreSendRequestHeaders
 D. ResolveRequestCache
 E. UpdateRequestCache

Question 21: Which of the following attributes can be used when using the Out-of-process mode for
session state in ASP.NET?
 A. timeout
 B. sqlConnectionString
 C. stateNetworkTimeout
 D. tcpipServer
 E. stateConnectionString

Question 22: An application is being developed which will validate XML documents against a variety of
schemas defined using either the XML Schema Definition language or the XML Data Reduced language.
The application will handle tens of thousands of documents daily and therefore good performance must
be considered essential. Which of the following actions will meet the above requirements?
 A. Load the XSD documents with the XmlValidatingReader and the XDR documents with the XmlReader.
B. Load all the documents through an XmlValidatingReader which has been associated with an
XmlSchemaCollection which contains the relevant XSD and XDR schemas.
C. Load the XSD documents with the XsdValidatingReader and the XDR documents with the
XdrValidatingReader.
D. Transform the XDR documents into XSD and load all the XSD documents through the
XsdValidatingReader.
E. Transform the XSD documents into XDR and load all the XDR documents through the
XdrValidatingReader.

Question 23: Which of the following entities cannot have meta-data attributes?
A. Event.
B. Assembly.
C. Property.
D. Namespace.
E. Delegate.

Question 24: A transactional component includes the method shown below. Which of the following
statements are true after the Debit method has returned?
public void Debit(int amount){
  balance -= amount;
  ContextUtil.EnableCommit();
}

A. The context's complete bit will be set to true.
B. The context's transaction will be committed.
C. The context's doomed flag will be set to true.
D. The context's consistent bit will be set to true.
E. The context's transaction will be aborted.

Question 25: When importing a function from an external DLL into C# which of the following
mechanisms can be used to uniquely identify the function?
A. Specifying the function's parameter signature.
B. Specifying the function name.
C. Specifying the function ordinal.
D. Specifying the function's strong name.
E. Specifying the function's GUID.

Question 26: A developer uses Microsoft Visual Studio.NET to develop an ASP.NET application. The
application will use Microsoft ADO.NET to obtain information from two Microsoft SQL Server 2000
databases. The developer plans to use DataSets and DataViews to display the SQL Server data for the
application and to update data in the databases. The developer intends to use the DataAdapter
Configuration Wizard to create SqlDataAdapters and the appropriate UPDATE, SELECT, INSERT, and
DELETE statements.

Which of the following correctly identify the number of SqlDataAdapters to be created?
A. One per DataSet
B. One per DataView
C. One per DataTable
D. One per SQL database
E. One per Application

Question 27: Which of the following data types can be used as an OUTPUT parameter for a stored
procedure?
A. cursor
B. decimal
C. int
D. varchar
E. binary


Question 28: Which of the following are upgrade paths supported between the different editions and
versions of SQL Server 2000?
 A. SQL Server 2000 Desktop Engine to SQL Server 2000 Windows CE Edition
 B. SQL Server 2000 Desktop Engine to SQL Server 2000 Enterprise Edition or to SQL Server 2000
Standard Edition
 C. SQL Server 2000 Standard Edition to SQL Server 2000 Enterprise Edition
 D. SQL Server 2000 Personal Edition to either SQL Server 2000 Enterprise Edition or to SQL Server 2000
Standard Edition
 E. SQL Server 2000 Standard Edition to SQL Server 2000 Desktop Engine

Question 29: Which of the following statements do not correctly identify uses of SQL Server 2000
triggers?
 A. Triggers can speed up the execution of code.
 B. Triggers can evaluate the state of a table before and after data modification and take action(s) based
on that difference.
 C. Triggers can enforce restrictions that are more complex than those defined with CHECK constraints.
 D. Triggers can cascade changes through related tables in the database.
 E. Multiple triggers of the same type on a table allow multiple, different actions to take place in
response to the same modification statement.

Question 30: Which of the following statements concerning configuration files are true?
A. ASP.NET configuration files are called IIS.config.
B. Configuration files are stored in Windows INI format.
C. Application configuration files have the same name as the executable with a .config extension.
D. The contents of configuration files are accessible through the 'Namespace.Configuration' class,
where Namespace is the assembly's default namespace.
E. Configuration files can only be copied with the .NET framework's copyconfig.exe program.

Question 31: Which of the following allows a class to be accessed remotely?
A. Implement the ISerializable interface.
B. Implement the IRemotable interface.
C. Inherit from the RemotableObject class.
D. Inherit from the MarshalByRefObject class.
E. Implement the IContextBoundObject class.
Question 32: Which of the following groups of members have permissions to execute the sp_addapprole
stored procedure in SQL Server 2000?
 A. db_securityadmin
 B. db_processadmin
 C. db_owner
 D. sysadmin fixed server role
 E. db_setupadmin

Question 33: Which of the following identifies an effect of raising an event when there are no delegates
subscribed to receive the event?
 A. The program will wait for a period of time specified by the EventHandlerTimeout value in the config
file.
 B. The program will raise a OnNullDelegate event.
 C. The program will throw a NullReferenceException.
 D. The program will call the NullReference delegate.
 E. The program will call the Garbage Collector to remove the event from memory.

Question 34: Which of the following accurately describe the sentence below?

When impersonation is enabled, ASP.NET can operate on behalf of the operating system.
 A. The statement is false. ASP.NET will operate on behalf of the user it impersonates.
 B. The statement is true. The System.Web.Cryptography namespace provides all the methods and
objects needed for these mechanisms.
 C. The statement is true. The System.Data namespace provides all the methods and objects needed for
these mechanisms.
 D. The statement is true. The System.Web.impersonation namespace provides all the methods and
objects needed for these mechanisms.
 E. The statement is false. ASP.NET does not support impersonation.

Question 35: A developer is using the SQL Server 2000 @@CURSOR_ROWS function to find out the
number of rows in a cursor. The developer detects that a negative number is returned. Which of the
following statements correctly describe a possible cause of this error?
 A. There are no rows fetched into the cursor.
 B. The cursor is of forward-only type.
 C. There are no records in the table for which the cursor is created.
 D. The cursor is still being populated with the table records.
 E. The cursor threshold is set to 0.

Question 36: An ASP.NET developer has a user control written in C# and another user control written in
VB.NET. Which of the following methods can the developer use to incorporate both the controls in an
ASP.NET Web Application project developed in C#.NET?
A. Migrate the CodeBehind of the control written in VB.NET to C#. Add the control to the ASP.NET Web
application.
B. Put the controls in a Web Control library. Add the reference to the ASP.NET Web application project.
C. Create two different Web user control libraries, one for each control. Add the reference to the
ASP.NET Web application.
D. Add the two controls to the ASP.NET Web application and use them as is.
 E. Create a composite user control in C# to use the two existing user controls. Add this new control to
the ASP.NET Web Application.

Question 37: A COM component server has been supplied without a type library and a C# application
needs to instantiate an object from the Sample class contained within the DLL. Which of the following
will allow the Sample class to be used from C#?
 A. The Type.GetTypeFromProgID method can be used to late-bind to instances of the Sample class.
 B. The Type.GetTypeFromCLASSID method can be used to late-bind to instances of the Sample class.
 C. The COM component must be imported to .NET with the comimp.exe program before C# can late-
bind to it.
 D. The tlbexp.exe program can be used to generate a type-library which can then be imported using the
tlbimp.exe program.
 E. The Sample class must be declared as type 'Type' to allow it to be late-bound to.


Question 38: Which of the following accurately describe the documents returned by the URL below?

http://IISServer/VirtualRoot?sql=SELECT * FROM Customers FOR XML AUTO
 A. An XML document containing all records of the Customers table
 B. An XML document with the single top-level element as "Customers"
 C. An XML document fragment containing all records of the Customers table without header
information
 D. An XML document fragment containing only the header information about the Customers table
 E. An XML template for the Customers table

Question 39: Which of the following techniques can reduce the chance of deadlocks in a multi-threaded
application?
A. Minimize the amount of code in all synchronized blocks.
B. Use a consistent order for obtaining locks.
C. Ensure the code extensively implements race conditions.
D. Use synchronization objects for synchronizing the starting and stopping of threads.
E. Ensure threads do not hold references to the DeadLock class for longer than necessary.

Question 40: Which of the following tasks do not use Reflection at runtime?
A. Viewing custom attributes.
B. Performing type discovery.
C. Late binding to COM objects.
D. Late binding to .NET objects.
E. Editing metadata.

Question 41: Which of the following cursors have a rowset size greater than 1 in SQL Server 2000?
A. Block cursors
B. Bulk cursors
C. Multi-threaded cursors
D. Browse cursors
E. Asynchronous cursors
Question 42: Which of the following effects will occur if a program attempts to subtract a delegate from
an event when the delegate is not subscribed to the event?
A. The program will keep on running.
B. The program will raise an InvalidOperation event.
C. The program will set the event to null.
D. The event will not subscribe the delegate if an attempt is made to add it later.
E. The program will throw an InvalidOperationexception.


Question 43: Which of the following are not features of SQL Server 2000 stored procedures?
 A. The stored procedures return the values in place of the stored procedure name when called.
 B. The stored procedures return a status value to a calling procedure or batch.
 C. The stored procedures accept input parameters and return multiple values in the form of output
parameters to the calling procedure or batch.
 D. The stored procedures contain programming statements that perform operations in the database,
including calling other procedures.
 E. The stored procedures cannot be used directly in the expressions.

Question 44: Which of the following accurately describe the ViewState feature in ASP.NET?
A. The mode attribute of the sessionState section in the Web.config is set to "InProc"
B. The mechanism used by ASP.NET to keep track of server control state values that do not otherwise
post back as part of the HTTP form
C. A hidden form field managed by the ASP.NET page framework
D. The mode attribute of the sessionState section in the Web.config is set to "OutProc"
E. The hidden form field is part of the page sent to the client.

Question 45: Which of the following statements about a method declared with an AutoComplete
attribute are true?
A. The method's transaction automatically calls EnableCommit if the method call returns normally.
B. The method's context will have a DeactivateOnReturn property of false.
C. The method's transaction is automatically aborted if the method call throws a handled exception.
D. The method's transaction is automatically aborted if the method call throws an unhandled
exception.
E. The method's context will have a MyTransactionVote property of true.

Question 46: In an ASP.NET Web service, session state is disabled by default. To store session state in
the ASP.NET HttpSessionState object, which of the following can be applied to a Web service method?
 A. Define a class level variable named EnableSession within the Web service and set its value to True in
all the Web methods that will share session state.
 B. When specifying the WebMethodAttribute, set the EnableSession property to True.
 C. In the Web.config file of the Web service project, in the sessionState section, set the value of the
EnableSession property to True.
 D. When specifying the WebMethodAttribute, set the EnableSessionState property to True.
 E. The WebService class has a property named EnableSession. Set it to True.

Question 47: From which of the following classes can a custom control designer inherit controls?
A. System.Web.UI.Design.WebControls.TemplatedControlDesigner
B. System.Web.UI.Design.ControlDesigner
C. System.Web.UI
D. System.Web
E. System.Web.UI.Design.WebControls.ReadWriteControlDesigner


Question 48: Which of the following code snippets in the web.config will result in cookieless sessions?
 A. <sessionState
   mode="InProc"
   stateConnectionString="tcpip=127.0.0.1:42424"
   sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
   cookieless="true"
   timeout="20"
/>
 B. <sessionState
   mode="StateServer"
   cookieless="true"
   timeout="20"
/>
 C. <sessionState
   mode="StateServer"
   stateConnectionString="tcpip=127.0.0.1:42424"
   sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
   cookieless="true"
   timeout="20"
/>
 D. <sessionState
   mode="InProc"
   stateConnectionString="tcpip=127.0.0.1:42424"
   sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
   cookieless="false"
   timeout="20"
/>
 E. <sessionState
   mode="SQLServer"
   stateConnectionString="tcpip=127.0.0.1:42424"
   sqlConnectionString="data
source=127.0.0.1;Trusted_Connection=yes"
   cookieless="true"
   timeout="20"
/>

Question 49: A developer plans to use data-bound controls to display data in an ASP.NET application.
This will include both list controls and template controls. The data will be supplied through several
different data sources.
Which of the following scenarios will require the use of the DataBinder.Eval method to display data?
A. When it is necessary to evaluate late-bound data-binding expressions
B. When the data source does not support the IList interface
C. When binding any data to a list control
D. When the data source does not support the IEnumerable interface
E. When the data must be bound to non-database content

Question 50: Which of the following statements accurately describe a function of the SQL Server 2000
trigger in the script below?

CREATE TRIGGER conditionalinsert
ON Sales
AFTER INSERT AS
IF
(SELECT COUNT(*) FROM Titles, Inserted
WHERE Titles.title_id = Inserted.title_id) <> @@ROWCOUNT
BEGIN
  DELETE Sales FROM Sales, Inserted
  WHERE Sales.title_id = Inserted.title_id AND
    Inserted.title_id NOT IN
      (SELECT title_id
      FROM Titles)
  PRINT 'Only sales records with matching title_ids added.'
END
 A. When unacceptable titles have been inserted, the transaction is not rolled back.
 B. When unacceptable titles have been inserted, the trigger deletes the unwanted rows from the Titles
table.
 C. When unacceptable titles have been inserted, the trigger deletes the unwanted rows from the Sales
table.
 D. When the number of rows in the Sales table exceeds the number of rows in the Titles table, the
trigger deletes rows from the Sales table.
 E. The trigger displays the message when a row from the Sales table is deleted.

Question 51: An application needs to parse the contents of XML files before displaying the contents on
the console. The files do not need to be validated but an exception needs to be thrown if the files are
not well-formed and the parsing must be done as quickly as possible. Which of the following solutions
meet these requirements?
 A. Load the files through an XMLTextReader object, displaying the contents to the console as they're
parsed.
 B. Load the files through an XMLTransform object, displaying the contents to the console as they're
parsed.
 C. Load the files into an XMLDocument object and then iterate over the DOM's nodes to display the
contents on the console.
 D. Load the files into an XMLDataDocument object and then iterate over the DOM's nodes to display
the contents on the console.
 E. Load the files through an XMLValidatingReader object, displaying the contents to the console as
they're parsed.
Question 52: Which of the following statements incorrectly describe .NET assemblies?
A. Assemblies form the fundamental unit for deployment.
B. Assemblies must be statically created at compile time.
C. Assemblies form the fundamental unit for versioning.
D. Assemblies are registered in the system registry.
E. Assemblies form the fundamental unit for security permissions.

Question 53: User3, a member of the db_owner fixed database role but not of the sysadmin fixed server
role, creates the table tblCalls. Another user, User4, wants to look at the records of the table tblCalls
using the SELECT command, but SQL Server 2000 generates an error. Which of the following statements
accurately describe a possible cause of the error?
 A. User4 did not qualify the table tblCalls with the name User3.
 B. User4 is not part of the sysadmin group.
 C. User3 did not grant access to User4 for the table tblCalls.
 D. User4 is not part of the dbo group for the table tblCalls.
 E. User4 does not own a table by the name of tblCalls.

Question 54: Which of the following lines of code can be used to set an authorization cookie and
redirect to an originating URL?
 A. FormsAuthentication.RedirectToLoginPage("username", false)
 B. FormsAuthentication.RedirectFromLoginPage("username", false)
 C. FormsAuthentication.Redirect("username", false)
 D. FormsAuthentication.RedirectFromLoginPage("username", true)
 E. FormsAuthentication.RedirectFromLoginPage("username", none)

								
To top