| Braindumps
of 70-310
XML
Web Services and Server Components with Visual Basic.NET
Exam Questions, Answers,
Braindumps (70-310)
Check some 70-310 questions.
These will help for you.
1. Your Microsoft SQL Server
database contains a table named Orders. Orders is
used to store new purchase orders as they are entered
into an order-entry application. To keep up with customer
demand, the order fulfillment department wants to
know at 15 mininute intervals when new orders are
entered.
You need to develop an
application that reads Orders every 15 minutes and
sends all new orders to the order fulfillment department.
The application will run on a computer that is used
by several users who continuously log on to and log
off from the network to perform miscellaneous tasks.
Which type of .NET application
should you use?
[A] Windows Form
[B] Windows service
[C] XML Web service
[D] .NET Remoting object
User Answer 1 - B
Correct Answer 1 - B
Description:
[Question 2]
2. You develop an application
named myApp. This application needs to run on the
same computer as a Windows service named myService.
You want to ensure that
myService starts from myApp if myService is not already
running.
Which code segment should
you use?
[A] Dim myServiceController As New ServiceController("myService")
If myServiceController.Status = ServiceControllerStatus.Stopped
Then
myServiceController.Start( )
End If
[B] Dim myServiceController As New ServiceController("myService")
myServiceController.Start( )
[C] Dim myServiceController As New ServiceController()
Dim myArgs(1) As String
myArgs(0) = "myService"
If myServiceController.Status = ServiceControllerStatus.Stopped
Then
myServiceController.Start(myArgs)
End If
[D] Dim myServiceController As New ServiceController()
Dim myArgs(1) as String, myArgs(0) = "myService"
myServiceController.Start(myArgs)
User Answer 2 -
Correct Answer 2 - A
Description:
[Question 3]
3. You are developing a
Windows application that requires the use of a calculation
function named CalculateValue. Thisfunction includes
the following signature:
CalculateValue(x As Integer)
As Integer
CalculateValue is located
in an unmanaged DLL named UsefulFunctions.dll, and
is not part of a COM interface. You need to be able
to use CalculateValue in your application.
Which action or actions
should you take? (Choose all that apply.)
[A] Use Regsvr32.exe to register UsefulFunctions.dll.
[B] Use Visual Studio .NET to add a reference to UsefulFunctions.dll
[C] To your application, add the following code segment:
Imports UsefulFunctions
[D] To your application, add the following code segment:
Declare Function CalculateValue_Lib "UsefulFunctions.dll"
(x As Integer) As Integer
User Answer 3 -
Correct Answer 3 - B-D
Description:
[Question 4]
4. You are using Visual
Studio .NET to develop a new application to replace
an older COM-based application. The new application
will use some of the old COM components until they
can be replaced by Visual Studio .NET code.
Your application uses a
COM DLL named OurCOM.dll. The Visual Studio .NET assembly
for OurCOM.dll must be named OurDotNetCOM. You must
use the name "ProjectX" for the namespace
of the COM components. You must ensure that your application
uses these naming guidelines.
What should you do?
[A] Reference OurCOM. dll from Visual Studio .NET.
Change the assembly name in Solution Explorer. Change
the namespace name by editing the assembly.
[B] Reference OurCOM.dll from Visual Studio .NET.
Change the assembly name in Solution Explorer. Change
the namespace name by using the Namespace property
of a CodeNamespacelmport object.
[C] Run the Type Library importer (Tlbimp.exe) with
the /namespace and /out options to create the assembly.
[D] Run the Type Library Importer (Tlbimp.exe) with
the /out option to create the assembly. Change the
namespace name by using the Namespace property of
a CodeNamespacelmport object.
User Answer 4 -
Correct Answer 4 - C
Description:
[Question 5]
5. You are using Visual
Studio .NET to develop an application that uses a
non-COM DLL named UsefulFunctions.dll. This DLL is
written in unmanaged code.
The DLL contains a function
that parses a string into an array of string words
and an array of numbers. A call to the function includes
the following pseudo code:
Input = "A string
with 6 words and 2 numbers"
words = Nothing
numbers = Nothing
Parse(input, words, numbers)
After execution, words
contains all string words found in input and numbers
contains all integers found in input. You need to
enable your application to call this function.
Which code segment should
you use?
[A] Declare Function Parse Lib "UsefulFunctions.dll"
_
(ByVal input As String, ByVal words() As String, _
ByVal numbers() As Integer) As Integer
[B] Declare Function Parse Lib "UsefulFunctions.dll"
_
(ByVal input As String, ByRef words() As String, _
ByRef numbers() As Integer) As Integer
[C] Declare Function Parse Lib "UsefulFunctions.dll"
_
(ByRef input As String, ByVal words() As String, _
ByVal numbers() As Integer) As Integer
[D] Declare Function Parse Lib "UsefulFunctions.dll"
_
(ByRef input As String, ByRefwords() As String, _
ByRef numbers() As Integer) As Integer
User Answer 5 -
Correct Answer 5 - B
Description:
[Question 6]
6. You are developing an
application by using Visual C# .NET and Visual Basic
.NET. The application will use functions from a DLL
written in unmanaged code.
One function requires the
calling application to allocate unmanaged memory,
fill it with data, and pass the address of the memory
to the function. On returning from the function, the
calling application must deallocate the unmanaged
memory.
You need to decide how
your application will handle unmanaged memory.
What should you do?
[A] Use a byte array.
[B] Use the methods of the Marshal class.
[C] Use the methods of the MemoryStream class.
[D] Derive a new class from the Stream class, and
override the allocation methods.
User Answer 6 -
Correct Answer 6 - B
Description:
[Question 7]
7. You create a serviced
component named StockQuote that implements the lStockQuote
interface. The StockQuote class includes the following
code segment:
Public Class StockQuote
Inherits ServicedComponent Implements IStockQuote
Public Function GetQuote(stock as Ticker) as Price
Implements
IStockQuote.GetQuote()
'Implementation code goes here.
End Function
End Class
You want to secure StockQuote
so that it can only be accessed by users in the Customers
and Managers roles.
Which two actions should
you take?
(Each correct answer presents
part of the solution. Choose two.)
[A] To the StockQuote class, add the following attribute:
[B] To the StockQuote class, add the following attribute:
[C] Implement the ISecurityCallContext
COM interface at the StockQuote class. Implement the
IsCaller method for the Customers and Managers roles.
[D] To the StockQuote class, add the following attribute:
[E] To the beginning of
the GetQuote method, add the following code segment:
If Not ContextUtil.IsCaller Then
Throw New SecurityException("Access is denied.")
End If
User Answer 7 -
Correct Answer 7 - A-D
Description:
[Question 8]
8. You create a serviced
component earned BankTransfer. BankTransfer is in
a COM+ application named Woodgrove Bank.
BankTransfer is secured
by using the SecurityRole attribute for the Tellers
and Managers roles. You want members of the WoodgroveBankTellers
group to be assigned to the Tellers role.
What should you do?
[A] Add another SecurityRole attribute to the BankTransfer
class for the WoodgroveBankTellers group.
[B] Modify the Tellers SecurityRole attribute on the
BankTransfer class to include the WoodgroveBankTellers
group.
[C] Use the Component Services tool to add a new role
named WoodgroveBankTellers.
[D] Use the Component Services tool to add the WoodgroveBankTellers
group to the existing Tellers role.
User Answer 8 -
Correct Answer 8 - D
Description:
[Question 9]
9. You are creating a serviced
component named UserManager. UserManager adds user
accounts to multiple transactional data sources The
UserManager class includes the following code segment:
_
Public Class UserManager
Inherits ServicedComponent
Public Sub AddUser(ByVal name As String, By Val password
As String)
'Code to add the user to data sources goes here.
End Sub
End Class
You must ensure that the
AddUser method reliably saves the new user to either
all data sources or no data sources.
What should you do?
[A] To AddUser, add the following attribute:
[B] To UserManager, add the following attribute:
[C] To the end of AddUser, add the following line
of code: ContextUtil.EnableCommit()
[D] To the end of AddUser, add the following line
of code: ContextUtil.MyTransactionVote = True
User Answer 9 -
Correct Answer 9 - C
Description:
[Question 10]
10. You create a serviced
component named HealthInfo. The component exposes
patienthealth records. You declaratively secure HealthInfo
by using role-based security.
You must ensure that the
security checks are enforced. You want to prevent
HealthInfo from executing if administrators turn off
security for the COM+ application.
What should you do?
[A] To the project source code, add the following
attribute:
AccessChecksLevelOption.ApplicationComponent)>
[B] To all methods, add the following attribute:
[C] To the beginning of
all methods, add the following code segment:
If Not ContextUtil.IsSecurityEnabled Then
ContextUtil.DisableCommit()
End If
[D] To the beginning of all methods, add the following
code segment:
If Not ContextUtil.IsSecurityEnabled Then
Throw New SecurityException("Security must be
enable")
End If
User Answer 10 -
Correct Answer 10 - D
Description:
[Question 11]
11. You create a serviced
component named Workitem that implements an interface
named IWorkItem You want to ensure that calls to the
serviced component through IWorkltem are queued.
What should you do?
[A] To WorkItem, add the following attribute:
[B] To WorkItem, add the
following attribute:
Isolation:=TransactionIsolationLevel.Serializable)>
[C] To the WorkItem assembly, add the following attribute:
QueueListenerEnabled:=True)>
[D] In the WorkItem implementation, override the Activate
method from the ServicedComponent class. In the Activate
method, add the following code segment:
Dim q As New Queue()
q.Enqueue(Me)
User Answer 11 -
Correct Answer 11 - A
Description:
[Question 12]
12. You create a serviced
component named Tracker that uses attributes to dynamically
register itself for COM+ services. Tracker is in an
assembly file named Fabrikam.dll. Tracker uses transactions
and role-based security. The roles and the application
identity for Tracker are configured on the development
computer.
You are preparing to hand
off Tracker to an administrator for deployment to
production computers. You want all the COM+ configuration
information for Tacker to be installed on the production
computers.
What should you do?
[A] Use the Component Services tool to export Tracker
to an .msi file. Provide to the administrator the
.msi file with instructions to run the installer.
[B] Provide to the a the Fabrikam.dll file. Instruct
the administrator to copy Fabrilcam.dll to all production
computers and to install it in the global assembly
cache.
[C] Provide to the administrator the Fabrikam.dll
file. Instruct the administrator to use the .NET Services
Installation tool (Regsvcs.exe) to install Tracker.
[D] Add a new merge module to your solution. Add Fabrikam.dll
to the merge module. Provide to the administrator
the .msm file with installation instructions.
User Answer 12 -
Correct Answer 12 - A
Description:
[Question 13]
13. You are using Visual
Studio .NET to develop an application to replace a
COM-based application. A former colleague began writing
a .NET class for the new application. This class will
be used by client applications as a COM object. You
are assigned to finish writing the class.
The class includes the
following code segment:
_
Public Class MyClass
Public Sub New()
'Implementation code goes here.
End Sub
_
Public Function MyMethod(ByVal param As String) As
Integer
Return True
End Function
_
Protected Function MyOtherMethod() As Boolean
Return True
End Function
_
Public ReadOnly Property MyProperty() As Integer
Get
Return 0
End Get
End Pr |