[ Pobierz całość w formacie PDF ]
lifetime of remote objects was determined by reference counts and pinging, .NET uses lifetime leases. The
lifetime of a remote object can be set through an application configuration file or through code. The ILease
Actualtests.com - The Power of Knowing
070-320
interface exposes properties that control leases. One of the properties of ILease, InitialLeaseTime, determines
the default amount of time that the object remains
QUESTION 79 You are debugging your application. You notice that the debug code does not execute properly.
Your code is listed below: #If DEBUG Then ' Code to connect to perform complex calculation #Else ' Code to
bypass calculation. #End If What should you do? (Each choice presents a complete solution.) (Select 2 choices.)
A. Add the code Dim Debug As Boolean = True to the beginning of the source code.
B. Compile the application with the command line vbc /d:DEBUG=TRUE.
C. Compile the application with the command line vbc /r:debug=true.
D. Add the attribute to the beginning of the source code.
E. Add the code #CONST DEBUG=True to the beginning of the source code.
Answer: B, E
In order to ensure that only the code that accesses the testing database executes, you can add the code #CONST
DEBUG=True to the module, or you can compile the application with the command line vbc
/d:DEBUG=TRUE. As with previous versions of Visual Basic, you may write conditional compile statements
that are included in a
compiled application based on the value of a constant. Visual Basic .NET provides both debugging and tracing
conditional attributes. You may set the Debug conditional attribute either in code with the #CONST statement
or in the command line by specifying the /d:DEBUG parameter.
QUESTION 80 Which method do you call for the first time when you access an XML Web service or service
method with which the SOAP extension is configured to execute? (Select the best choice.)
A. GetInitializer
B. Intialize
C. SetIntialize
D. Begin
Answer: A
You call the GetInitializer method the first time when you access an XML Web service or service method with
which the SOAP extension is configured to execute.
QUESTION 81 You need to log when your application is restarted. Which file would interest you? (Select the
best choice.)
A. Global.asax
B. web.config
C. Machine.xonfig
D. Global.asa
Answer: A
The Global.asax file enables you to manage application-level events. This file resides in the root directory of an
ASP.NET Web application or ASP.NET Web service. The Global.asax.cs or Global.asax.vb class file is a
hidden, dependent file of Global.asax, which contains the code for handling application events such as the
Application_OnError event.
QUESTION 82 You create an application using C#, CKOrderFulfillment and configure CKOrderFulfillment to
use Integrated Windows authentication. You write the following code to create permissions in GetSalesInfo:
PrincipalPermission myPermission1 = New_PrincipalPermission(Nothing, "HRMgr")PrincipalPermission
myPermission2 = New_PrincipalPermission(Nothing,
Actualtests.com - The Power of Knowing
070-320
"ManagingDirector")
You need to write the remaining code in GetDailyRevenue to ensure that only users in the HRMgr group and
the ManagingDirector group can access SalesInformation. Which code segment should you use?
A. myPermission1.Intersect(myPermission2).Demand()
B. myPermission1.Include(myPermission2).Demand()
C. myPermission1.Union(myPermission2).Demand()
D. myPermission1.Demand() myPermission2.Demand()
E. myPermission2 = myPermission1.Copy()
myPermission2.Demand()
Answer: C
Explanation: The Union method creates a permission that is the union of the current permission and the
specified permission. We want a union of the HRMgr and the Director group.
QUESTION 83 You are creating an online application using C# to manage meetings for MeetingMakers Inc.
This application will contain two fields: Date and time. Which of these codes will create a unique constraint
named Events for the table named Calendar?
A.
B.
C.
D.
Answer: B
This code creates a unique constraint named Events for the table named Calendar. The element
defines a unique constraint. The msdata:PrimaryKey="true" attribute must be included in order to define a
primary key. The xpath property of the element points to the table element to which the constraint
will be applied, and the xpath property of the elements identifies the fields that make up the primary
key. Multiple elements must be used to specify a composite key.
Actualtests.com - The Power of Knowing
070-320
QUESTION 84 You are creating a web service that will be used to perform online banking. The bank requires
fast response and is protected by a firewall. Which should you choose? (Select all that apply.)
A. Use HTTP protocol
B. Use Binary-formatted messages
C. Use TCP protocol
D. Use SOAP-formatted messages
Answer: A, B
The Web service should use HTTP protocol and binary-formatted messages for the greatest performance and
security. You must use the HTTP protocol in order to utilize the security features of IIS. Binary-formatted
messages perform much faster than SOAP-formatted messages. The HTTP Channel class in the .NET
Framework provides the mechanism to communicate with the HTTP protocol. To configure the Web service to
use the HTTP protocol with binary-formatted messages, the Web.config file should contain text similar to the
following.
QUESTION 85 You are creating a web based email system which assesses a web service. Which of the
following methods should your Web service use to store the provided credentials by email users? (Select the
best choice.)
A. Store the submitted credentials in a Credential Cache object.
B. Store the submitted credentials in an Authentication Manager object.
C. Store the submitted credentials in a string array.
D. Store the submitted credentials in a string, separating each set of credentials with semicolons (;).
Answer: A
In order to store multiple sets of credentials, you should store the submitted credentials in a Credential Cache
object. Credential Cache objects store credentials for multiple resources. Neither strings nor string arrays are the
ideal choice for storing credentials. The Authentication Manager object manages the authentication modules
that are called during authentication.
[ Pobierz całość w formacie PDF ]