Which code segment should you add?
You are implementing a method in an ASP.NET application that includes the following requirements.
Store the number of active bugs in the cache. The value should remain in the cache when there are
calls more often than every 15 seconds. The value should be removed from the cache after 60
seconds. You need to add code to meet the requirements. Which code segment should you add?
What are two possible ways to achieve this goal?
You are developing a Windows Communication Foundation (WCF) service that returns
location information for authorized law enforcement agencies. The service contract is as
follows. [ServiceContract] public interface IMappingService { [OperationContract] long[]
GetLocationCoordinates(String cityNaroe); [OperationContract] long[]
GetLocationOfCitizen(String ssn) ; } Users are authenticated and impersonated. The system
uses ASP.NET roles. The members of law enforcement are members of the
LawEnforcement role. You need to ensure that only members of the LawEnforcement role
can call these methods. What are two possible ways to achieve this goal? (Each correct
answer presents a complete solution. Choose two.)
Which attribute should you use?
You are implementing an ASP.NET application that will use session state in out-of-proc mode. You
add the following code.
public class Person
{
public string FirstName { get; set;}
public string LastName { get; set;}
}
You need to add an attribute to the Person class to ensure that you can save an instance to session
state. Which attribute should you use?
You need to track unsuccessful attempts to access the service
You have a secured Windows Communication Foundation (WCF) service. You need to
track unsuccessful attempts to access the service. What should you do?
Which attribute should you use?
You are implementing an ASP.NET application that will use session state in out-of-proc mode.
You add the following code.
Public Class Person
Public Property FirstName As String
Public Property LastName As String
End Class
You need to add an attribute to the Person class to ensure that you can save an instance to session
state. Which attribute should you use?
Which code segment should you use?
You create a Web page named TestPage.aspx and a user control named contained in a file named
TestUserControl.ascx. You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which
code segment should you use?
You need to ensure that the client can invoke methods on the service successfully
A client application calls a Windows Communication Foundation (WCF) service with a proxy
class that was generated by Visual Studio. The service binding was changed from
wsHttpBinding to basicHttpBinding. The method signatures in the service contract are
changed. After these changes, the client application receives errors when calling methods
on the service. You need to ensure that the client can invoke methods on the service
successfully. What should you do?
Which code segment should you use?
You need to dynamically add TestUserControl.ascx to TestPage.aspx. Which code segment should
you use?
You need to dynamically add values to the end of the drop-down list
You need to ensure that the client applications can discover the services
You are configuring services to be discoverable. The services must be discoverable without
relying on a central server. Client applications that consume the services are on a network
segment that is separate from the network segment that the services are located on. A
firewall blocks all TCP ports between the two network segments, but allows other protocols
to pass through. You need to ensure that the client applications can discover the services.
What should you do?